|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjavax.management.modelmbean.RequiredModelMBean
Mandatory Model MBean implementation. The Model MBean implementation can be configured by setting a jbossmx.required.modelmbean.class system property.
ModelMBean| Constructor Summary | |
RequiredModelMBean()
|
|
RequiredModelMBean(ModelMBeanInfo info)
|
|
| Method Summary | |
void |
addAttributeChangeNotificationListener(NotificationListener inlistener,
String inAttributeName,
Object inhandback)
|
void |
addNotificationListener(NotificationListener inlistener,
NotificationFilter infilter,
Object inhandback)
Add a listener to an MBean. |
Object |
getAttribute(String attrName)
Returns the value of the attribute with the name matching the passed string. |
AttributeList |
getAttributes(String[] attrNames)
Returns the values of the attributes with names matching the passed string array. |
MBeanInfo |
getMBeanInfo()
Returns the management interface that describes this dynamic resource. |
MBeanNotificationInfo[] |
getNotificationInfo()
Returns the notification metadata associated with the MBean. |
Object |
invoke(String opName,
Object[] opArgs,
String[] sig)
Invokes a resource operation. |
void |
load()
Retrieves the MBean's state from a persistence store. |
void |
postDeregister()
This method is called by the MBeanServer after deregistration takes place. |
void |
postRegister(Boolean registrationDone)
This method is called by the MBeanServer after registration takes place or when registration fails. |
void |
preDeregister()
This method is called by the MBeanServer before deregistration takes place. |
ObjectName |
preRegister(MBeanServer server,
ObjectName name)
This method is called by the MBeanServer before registration takes place. |
void |
removeAttributeChangeNotificationListener(NotificationListener inlistener,
String inAttributeName)
|
void |
removeNotificationListener(NotificationListener inlistener)
Removes a listener from an MBean. |
void |
removeNotificationListener(NotificationListener listener,
NotificationFilter filter,
Object handback)
Removes a listener from the Emitter. |
void |
sendAttributeChangeNotification(Attribute inOldVal,
Attribute inNewVal)
|
void |
sendAttributeChangeNotification(AttributeChangeNotification ntfyObj)
|
void |
sendNotification(Notification ntfyObj)
|
void |
sendNotification(String ntfyText)
|
void |
setAttribute(Attribute attribute)
Sets the value of an attribute. |
AttributeList |
setAttributes(AttributeList attributes)
Sets the values of the attributes passed as an AttributeList of name and new value pairs. |
void |
setManagedResource(Object mr,
String mr_type)
|
void |
setModelMBeanInfo(ModelMBeanInfo info)
|
void |
store()
Stores the MBean's state to a persistence store. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RequiredModelMBean()
throws MBeanException,
RuntimeOperationsException
public RequiredModelMBean(ModelMBeanInfo info) throws MBeanException, RuntimeOperationsException
| Method Detail |
public void setModelMBeanInfo(ModelMBeanInfo info) throws MBeanException, RuntimeOperationsException
setModelMBeanInfo in interface ModelMBeanpublic void setManagedResource(Object mr, String mr_type) throws MBeanException, RuntimeOperationsException, InstanceNotFoundException, InvalidTargetObjectTypeException
setManagedResource in interface ModelMBean
public void load()
throws MBeanException,
RuntimeOperationsException,
InstanceNotFoundException
PersistentMBean
load in interface PersistentMBeanInstanceNotFoundException - if the MBean's state could not be found
MBeanException - wraps application exceptions from persistence store
RuntimeOperationsException
public void store()
throws MBeanException,
RuntimeOperationsException,
InstanceNotFoundException
PersistentMBean
store in interface PersistentMBeanInstanceNotFoundException - if the MBean's state could not be stored
MBeanException - wraps application exceptions from persistence store
RuntimeOperationsExceptionpublic MBeanInfo getMBeanInfo()
DynamicMBean
getMBeanInfo in interface DynamicMBeanpublic Object invoke(String opName, Object[] opArgs, String[] sig) throws MBeanException, ReflectionException
DynamicMBean
invoke in interface DynamicMBeanopName - the name of the operation to perform.opArgs - the parameters to pass to the operation.sig - the signartures of the parameters.
ReflectionException - wraps any error invoking the resource.
MBeanException - wraps any error thrown by the resource when
performing the operation.public Object getAttribute(String attrName) throws AttributeNotFoundException, MBeanException, ReflectionException
DynamicMBean
getAttribute in interface DynamicMBeanattrName - the name of the attribute.
MBeanException - wraps any error thrown by the resource when
getting the attribute.
ReflectionException - wraps any error invoking the resource.
AttributeNotFoundException - when there is no such attribute.public AttributeList getAttributes(String[] attrNames)
DynamicMBean
getAttributes in interface DynamicMBeanattrNames - the names of the attribute.
AttributeList of name and value pairs.public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
DynamicMBeanAttribute.
setAttribute in interface DynamicMBeanattribute - the name and new value of the attribute.
AttributeNotFoundException - when there is no such attribute.
MBeanException - wraps any error thrown by the resource when
setting the new value.
InvalidAttributeValueException - when the new value cannot be
converted to the type of the attribute.
ReflectionException - wraps any error invoking the resource.Attributepublic AttributeList setAttributes(AttributeList attributes)
DynamicMBeanAttributeList of name and new value pairs.
setAttributes in interface DynamicMBeanattributes - the name an new value pairs.
AttributeList of name and value pairs
that were actually set.public void addNotificationListener(NotificationListener inlistener, NotificationFilter infilter, Object inhandback) throws IllegalArgumentException
NotificationBroadcaster
addNotificationListener in interface NotificationBroadcasterinlistener - implementation of the listener objectinfilter - implementation of the filter object or null
if no filtering is requiredinhandback - A handback object associated with each notification
sent by this notification broadcaster.
IllegalArgumentException - if listener is nullpublic void removeNotificationListener(NotificationListener inlistener) throws ListenerNotFoundException
NotificationBroadcaster
removeNotificationListener in interface NotificationBroadcasterinlistener - the listener object to remove
ListenerNotFoundException - if the listener was not foundpublic void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
NotificationEmitterOnly the listener, filter, handback triplet is removed
removeNotificationListener in interface NotificationEmitterlistener - the listener object to removefilter - the filter registered with the listenerhandback - the handback object associated with the registered listener
ListenerNotFoundException - if the listener was not foundpublic void sendNotification(Notification ntfyObj) throws MBeanException, RuntimeOperationsException
sendNotification in interface ModelMBeanNotificationBroadcasterpublic void sendNotification(String ntfyText) throws MBeanException, RuntimeOperationsException
sendNotification in interface ModelMBeanNotificationBroadcasterpublic MBeanNotificationInfo[] getNotificationInfo()
NotificationBroadcaster
getNotificationInfo in interface NotificationBroadcasterMBeanNotificationInfopublic void addAttributeChangeNotificationListener(NotificationListener inlistener, String inAttributeName, Object inhandback) throws MBeanException, RuntimeOperationsException, IllegalArgumentException
addAttributeChangeNotificationListener in interface ModelMBeanNotificationBroadcasterpublic void removeAttributeChangeNotificationListener(NotificationListener inlistener, String inAttributeName) throws MBeanException, RuntimeOperationsException, ListenerNotFoundException
removeAttributeChangeNotificationListener in interface ModelMBeanNotificationBroadcasterpublic void sendAttributeChangeNotification(AttributeChangeNotification ntfyObj) throws MBeanException, RuntimeOperationsException
sendAttributeChangeNotification in interface ModelMBeanNotificationBroadcasterpublic void sendAttributeChangeNotification(Attribute inOldVal, Attribute inNewVal) throws MBeanException, RuntimeOperationsException
sendAttributeChangeNotification in interface ModelMBeanNotificationBroadcasterpublic ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
MBeanRegistrationThe MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preRegister in interface MBeanRegistrationException - for any error, the MBean is not registered.public void postRegister(Boolean registrationDone)
MBeanRegistration
postRegister in interface MBeanRegistrationregistrationDone - the MBeanServer passes true when the
MBean was registered, false otherwise.
public void preDeregister()
throws Exception
MBeanRegistrationThe MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preDeregister in interface MBeanRegistrationExceptionpublic void postDeregister()
MBeanRegistration
postDeregister in interface MBeanRegistration
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||