|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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)
Constructs a RequiredModelMBean object using ModelMBeanInfo passed in. |
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. |
protected ClassLoaderRepository |
getClassLoaderRepository()
|
MBeanInfo |
getMBeanInfo()
Returns the management interface that describes this dynamic resource. |
MBeanNotificationInfo[] |
getNotificationInfo()
Returns the array of Notifications generated by the RequiredModelMBean. |
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 ModelMBean
public 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 PersistentMBean
MBeanException
- wraps application exceptions from persistence store
InstanceNotFoundException
- if the MBean's state could not be found
RuntimeOperationsException
public void store() throws MBeanException, RuntimeOperationsException, InstanceNotFoundException
PersistentMBean
store
in interface PersistentMBean
InstanceNotFoundException
- if the MBean's state could not be stored
MBeanException
- wraps application exceptions from persistence store
RuntimeOperationsException
public MBeanInfo getMBeanInfo()
DynamicMBean
getMBeanInfo
in interface DynamicMBean
public Object invoke(String opName, Object[] opArgs, String[] sig) throws MBeanException, ReflectionException
DynamicMBean
invoke
in interface DynamicMBean
opName
- 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 DynamicMBean
attrName
- the name of the attribute.
ReflectionException
- wraps any error invoking the resource.
MBeanException
- wraps any error thrown by the resource when
getting the attribute.
AttributeNotFoundException
- when there is no such attribute.public AttributeList getAttributes(String[] attrNames)
DynamicMBean
getAttributes
in interface DynamicMBean
attrNames
- the names of the attribute.
AttributeList
of name and value pairs.public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
DynamicMBean
Attribute
.
setAttribute
in interface DynamicMBean
attribute
- the name and new value of the attribute.
MBeanException
- wraps any error thrown by the resource when
setting the new value.
ReflectionException
- wraps any error invoking the resource.
InvalidAttributeValueException
- when the new value cannot be
converted to the type of the attribute.
AttributeNotFoundException
- when there is no such attribute.Attribute
public AttributeList setAttributes(AttributeList attributes)
DynamicMBean
AttributeList
of name and new value pairs.
setAttributes
in interface DynamicMBean
attributes
- 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 NotificationBroadcaster
inlistener
- 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 NotificationBroadcaster
inlistener
- the listener object to remove
ListenerNotFoundException
- if the listener was not foundpublic void removeNotificationListener(NotificationListener listener, NotificationFilter filter, Object handback) throws ListenerNotFoundException
NotificationEmitter
Only the listener, filter, handback triplet is removed
removeNotificationListener
in interface NotificationEmitter
listener
- 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 ModelMBeanNotificationBroadcaster
public void sendNotification(String ntfyText) throws MBeanException, RuntimeOperationsException
sendNotification
in interface ModelMBeanNotificationBroadcaster
public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface NotificationBroadcaster
MBeanNotificationInfo
public void addAttributeChangeNotificationListener(NotificationListener inlistener, String inAttributeName, Object inhandback) throws MBeanException, RuntimeOperationsException, IllegalArgumentException
addAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster
public void removeAttributeChangeNotificationListener(NotificationListener inlistener, String inAttributeName) throws MBeanException, RuntimeOperationsException, ListenerNotFoundException
removeAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster
public void sendAttributeChangeNotification(AttributeChangeNotification ntfyObj) throws MBeanException, RuntimeOperationsException
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster
public void sendAttributeChangeNotification(Attribute inOldVal, Attribute inNewVal) throws MBeanException, RuntimeOperationsException
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception
MBeanRegistration
The MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preRegister
in interface MBeanRegistration
Exception
- for any error, the MBean is not registered.public void postRegister(Boolean registrationDone)
MBeanRegistration
postRegister
in interface MBeanRegistration
registrationDone
- the MBeanServer passes true when the
MBean was registered, false otherwise.public void preDeregister() throws Exception
MBeanRegistration
The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preDeregister
in interface MBeanRegistration
Exception
public void postDeregister()
MBeanRegistration
postDeregister
in interface MBeanRegistration
protected ClassLoaderRepository getClassLoaderRepository()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |