|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.management.NotificationBroadcasterSupport | +--javax.management.modelmbean.RequiredModelMBean
Constructor Summary | |
RequiredModelMBean()
|
|
RequiredModelMBean(javax.management.modelmbean.ModelMBeanInfo info)
|
Method Summary | |
void |
addAttributeChangeNotificationListener(javax.management.NotificationListener listener,
java.lang.String attributeName,
java.lang.Object handback)
|
java.lang.Object |
getAttribute(java.lang.String attribute)
Returns the value of the given attribute. |
javax.management.AttributeList |
getAttributes(java.lang.String[] attributes)
Returns an AttributeList given an array of attributes. |
javax.management.MBeanInfo |
getMBeanInfo()
Provides the exposed attributes/actions of this DynamicMBean |
java.lang.Object |
invoke(java.lang.String method,
java.lang.Object[] arguments,
java.lang.String[] params)
Invoke the given method. |
void |
load()
Instantiates for the data found in the persistance store. |
void |
postDeregister()
Called upon after the MBean has been de-registered. |
void |
postRegister(java.lang.Boolean registrationDone)
Called upon after a registration ( successful or not ). |
void |
preDeregister()
Called upon before an MBean will be de-registered by
the MBeanServer . |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
Allows the MBean to perform any operations before being registered to the MBeanServer . |
void |
removeAttributeChangeNotificationListener(javax.management.NotificationListener listener,
java.lang.String attributeName)
|
void |
sendAttributeChangeNotification(javax.management.Attribute oldAttribute,
javax.management.Attribute newAttribute)
|
void |
sendAttributeChangeNotification(javax.management.AttributeChangeNotification notification)
|
void |
sendNotification(java.lang.String message)
|
void |
setAttribute(javax.management.Attribute attribute)
Set the value of the specific attribute |
javax.management.AttributeList |
setAttributes(javax.management.AttributeList attributes)
Set the attribute using the given attribute as an AttributeList |
void |
setManagedResource(java.lang.Object resource,
java.lang.String resourceType)
|
void |
setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo modelMBeanInfo)
|
void |
store()
Captures the current state of the MBean. |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.management.modelmbean.ModelMBeanNotificationBroadcaster |
sendNotification |
Methods inherited from interface javax.management.NotificationBroadcaster |
addNotificationListener, getNotificationInfo, removeNotificationListener |
Constructor Detail |
public RequiredModelMBean() throws MBeanException, RuntimeOperationsException
public RequiredModelMBean(javax.management.modelmbean.ModelMBeanInfo info) throws MBeanException, RuntimeOperationsException
Method Detail |
public javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name) throws java.lang.Exception
MBeanRegistration
MBeanServer
.
Any exception will cause the MBean not being registered.
preRegister
in interface MBeanRegistration
server
- The MBeanServer on which the MBean will be registered.name
- The ObjectName
of the MBean.
java.lang.Exception
- Exception of the operation. Note that this is caught
by the MBeanServer
and re-thrown as an
MBeanRegistrationException
.public void postRegister(java.lang.Boolean registrationDone)
MBeanRegistration
postRegister
in interface MBeanRegistration
registrationDone
- Evaluates to true of the registrations
is successful, false otherwise.public void preDeregister() throws java.lang.Exception
MBeanRegistration
MBean
will be de-registered by
the MBeanServer
.
preDeregister
in interface MBeanRegistration
java.lang.Exception
- Would be caught by the MBeanServer
and rethrown as an MBeanRegistrationException.public void postDeregister()
MBeanRegistration
postDeregister
in interface MBeanRegistration
public void setModelMBeanInfo(javax.management.modelmbean.ModelMBeanInfo modelMBeanInfo) throws MBeanException, RuntimeOperationsException
setModelMBeanInfo
in interface ModelMBean
MBeanException
RuntimeOperationsException
public void setManagedResource(java.lang.Object resource, java.lang.String resourceType) throws MBeanException, RuntimeOperationsException, InstanceNotFoundException, InvalidTargetObjectTypeException
setManagedResource
in interface ModelMBean
MBeanException
RuntimeOperationsException
InstanceNotFoundException
InvalidTargetObjectTypeException
public javax.management.MBeanInfo getMBeanInfo()
DynamicMBean
DynamicMBean
getMBeanInfo
in interface DynamicMBean
MBeanInfo
public void addAttributeChangeNotificationListener(javax.management.NotificationListener listener, java.lang.String attributeName, java.lang.Object handback) throws MBeanException, RuntimeOperationsException, java.lang.IllegalArgumentException
addAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster
MBeanException
RuntimeOperationsException
java.lang.IllegalArgumentException
public void removeAttributeChangeNotificationListener(javax.management.NotificationListener listener, java.lang.String attributeName) throws MBeanException, RuntimeOperationsException, ListenerNotFoundException
removeAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster
MBeanException
RuntimeOperationsException
ListenerNotFoundException
public void sendAttributeChangeNotification(javax.management.Attribute oldAttribute, javax.management.Attribute newAttribute) throws MBeanException, RuntimeOperationsException
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster
MBeanException
RuntimeOperationsException
public void sendAttributeChangeNotification(javax.management.AttributeChangeNotification notification) throws MBeanException, RuntimeOperationsException
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster
MBeanException
RuntimeOperationsException
public void sendNotification(java.lang.String message) throws MBeanException, RuntimeOperationsException
sendNotification
in interface ModelMBeanNotificationBroadcaster
MBeanException
RuntimeOperationsException
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
DynamicMBean
AttributeList
given an array of attributes.
getAttributes
in interface DynamicMBean
attributes
- The array of attributes being retrieved
Attribute
public java.lang.Object getAttribute(java.lang.String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
DynamicMBean
getAttribute
in interface DynamicMBean
attribute
- The attribute name for the value being retrieved.
ReflectionException
- Wraps a java.lang.Exception while trying
to invoke the getter.
AttributeNotFoundException
- If the given attribute isn't found.
MBeanException
- Wraps a java.lang.Exceptionpublic javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
DynamicMBean
AttributeList
setAttributes
in interface DynamicMBean
attributes
- The attribute being set.
Attribute
successfully set.public void setAttribute(javax.management.Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
DynamicMBean
setAttribute
in interface DynamicMBean
attribute
- The Attribute
being set.
MBeanException
- Wraps a java.lang.Exception which is thrown
by the setter.
AttributeNotFoundException
InvalidAttributeValueException
ReflectionException
public java.lang.Object invoke(java.lang.String method, java.lang.Object[] arguments, java.lang.String[] params) throws MBeanException, ReflectionException
DynamicMBean
invoke
in interface DynamicMBean
method
- The name of the method to be invoked.arguments
- The array of arguments to be set.params
- Contains the signature of the method to be invoked.
ReflectionException
MBeanException
- Wraps a java.lang.Exceptionpublic void load() throws MBeanException, RuntimeOperationsException, InstanceNotFoundException
PersistentMBean
load
in interface PersistentMBean
RuntimeOperationsException
- Wraps exception from persistance operation
MBeanException
- Wraps another exception or thrown when
persistance is not supported.
InstanceNotFoundException
- Cant find the MBean
from
the persistance store.public void store() throws MBeanException, RuntimeOperationsException, InstanceNotFoundException
PersistentMBean
store
in interface PersistentMBean
InstanceNotFoundException
RuntimeOperationsException
MBeanException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |