org.oddjob.jmx.server
Interface ServerInterfaceHandler

All Known Implementing Classes:
ServerAllOperationsHandler

public interface ServerInterfaceHandler

Handle communication between an instance of an interface and an MBean.

Implementations handle invocations on the methods of an interface and provide notifications for the MBean to propagate onwards.

Finally the handler must clear up any resources it might have created in the execution of it duties, such as removing listeners. This is done in the destroy() method.

Author:
Rob Gordon.

Method Summary
 void destroy()
          Clear up any resource this handler might have created.
 Object invoke(RemoteOperation<?> operation, Object[] params)
          Invoke an operation.
 

Method Detail

invoke

Object invoke(RemoteOperation<?> operation,
              Object[] params)
              throws MBeanException,
                     ReflectionException
Invoke an operation.

Note that this method is not parameterised on return type. This is because it is called from JMX which has no interest in the return type. Adding a return type would also require that return values from the methods were cast to the parameter which would be a lot of code for no advantage.

Parameters:
actionName - The action (method) name.
params - The parameter object array.
signature - The parameter types as class names.
Returns:
The result if any.
Throws:
MBeanException
ReflectionException

destroy

void destroy()
Clear up any resource this handler might have created.