public class OddjobMBean extends NotificationBroadcasterSupport implements DynamicMBean
Once the bean is created it will sit and wait for clients to interrogate it. When a client accesses the bean it should call the resync method which will cause the bean to resend the notifications necessary to recreate in the client, the state of the bean. During the resync the InterfaceHandlers should block any any more changes until the resync has completed.
Constructor and Description |
---|
OddjobMBean(Object node,
ObjectName objectName,
ServerSession factory,
ServerContext srvcon)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy this node.
|
Object |
getAttribute(String attribute) |
AttributeList |
getAttributes(String[] attributes) |
MBeanInfo |
getMBeanInfo() |
Object |
getNode() |
MBeanNotificationInfo[] |
getNotificationInfo() |
Object |
invoke(String actionName,
Object[] params,
String[] signature) |
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList attributes) |
String |
toString() |
addNotificationListener, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
public OddjobMBean(Object node, ObjectName objectName, ServerSession factory, ServerContext srvcon)
node
- The job this is shadowing.objectName
- The objectName for this node.factory
- The factory for creating child OddjobMBeans. May be null only
if this MBean will never have children.srvcon
- The server context The server context. Must not be null.RemoteException
public Object getNode()
public Object getAttribute(String attribute) throws ReflectionException, MBeanException
getAttribute
in interface DynamicMBean
ReflectionException
MBeanException
public void setAttribute(Attribute attribute) throws ReflectionException, MBeanException
setAttribute
in interface DynamicMBean
ReflectionException
MBeanException
public AttributeList getAttributes(String[] attributes)
getAttributes
in interface DynamicMBean
public AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface NotificationBroadcaster
getNotificationInfo
in class NotificationBroadcasterSupport
public void destroy()