org.oddjob.jmx.handlers
Class VanillaServerHandlerFactory<T>

java.lang.Object
  extended by org.oddjob.jmx.handlers.VanillaServerHandlerFactory<T>
All Implemented Interfaces:
ServerInterfaceHandlerFactory<T,T>

public class VanillaServerHandlerFactory<T>
extends Object
implements ServerInterfaceHandlerFactory<T,T>

Factory that provides handlers for an interface where the invocation of methods on that interface are just straight to the JMX MBean.

Use this when there is no call backs, and no final properties of the target where performance might benefit from caching.

Author:
rob

Constructor Summary
VanillaServerHandlerFactory(Class<T> cl)
          Constructor.
 
Method Summary
 ClientHandlerResolver<T> clientHandlerFactory()
          Provide the corresponding ClientInterfaceHandlerFactory resolver.
 ServerInterfaceHandler createServerHandler(T target, ServerSideToolkit ojmb)
          Create a handler that handles communication on behalf of the MBean with the interface.
 MBeanAttributeInfo[] getMBeanAttributeInfo()
          Get the MBeanAttributeInfo for the interface.
 MBeanNotificationInfo[] getMBeanNotificationInfo()
          Get the MBeanNotificationInfo for the interface.
 MBeanOperationInfo[] getMBeanOperationInfo()
          Get the MBeanOperationInfo for the interface.
 Class<T> interfaceClass()
          Provide the interface class this is the information about.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VanillaServerHandlerFactory

public VanillaServerHandlerFactory(Class<T> cl)
Constructor.

Parameters:
cl - The interface for which we wish to provide handlers.
Method Detail

interfaceClass

public Class<T> interfaceClass()
Description copied from interface: ServerInterfaceHandlerFactory
Provide the interface class this is the information about.

Specified by:
interfaceClass in interface ServerInterfaceHandlerFactory<T,T>
Returns:
The class.

getMBeanAttributeInfo

public MBeanAttributeInfo[] getMBeanAttributeInfo()
Description copied from interface: ServerInterfaceHandlerFactory
Get the MBeanAttributeInfo for the interface.

Specified by:
getMBeanAttributeInfo in interface ServerInterfaceHandlerFactory<T,T>
Returns:
An MBeanAttributeInfo array.

getMBeanOperationInfo

public MBeanOperationInfo[] getMBeanOperationInfo()
Description copied from interface: ServerInterfaceHandlerFactory
Get the MBeanOperationInfo for the interface.

Specified by:
getMBeanOperationInfo in interface ServerInterfaceHandlerFactory<T,T>
Returns:
An MBeanOperationInfo array.

getMBeanNotificationInfo

public MBeanNotificationInfo[] getMBeanNotificationInfo()
Description copied from interface: ServerInterfaceHandlerFactory
Get the MBeanNotificationInfo for the interface.

Specified by:
getMBeanNotificationInfo in interface ServerInterfaceHandlerFactory<T,T>
Returns:
An MBeanNotificationInfo array.

createServerHandler

public ServerInterfaceHandler createServerHandler(T target,
                                                  ServerSideToolkit ojmb)
Description copied from interface: ServerInterfaceHandlerFactory
Create a handler that handles communication on behalf of the MBean with the interface.

Specified by:
createServerHandler in interface ServerInterfaceHandlerFactory<T,T>
Parameters:
target - The target object implementing the interface.
ojmb - The OddjobMBean.
Returns:
An InterfaceHandler.

clientHandlerFactory

public ClientHandlerResolver<T> clientHandlerFactory()
Description copied from interface: ServerInterfaceHandlerFactory
Provide the corresponding ClientInterfaceHandlerFactory resolver.

Specified by:
clientHandlerFactory in interface ServerInterfaceHandlerFactory<T,T>
Returns:
The resolver.