|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.server.AbstractMBeanInvoker (src)
org.jboss.mx.modelmbean.ModelMBeanInvoker
An extension of the MBeanInvoker
(src)
that implements the base Model MBean functionality, essentially making the
Model MBean just another invoker of managed resources.
ModelMBean
(src) ,
MBeanInvoker
(src) Nested Class Summary |
Nested classes inherited from class org.jboss.mx.server.AbstractMBeanInvoker (src) |
AbstractMBeanInvoker.OperationKey (src) |
Field Summary | |
protected long |
attrNotifierSequence
Notification sequence number for attribute change notifications. |
protected JBossNotificationBroadcasterSupport (src) |
notifier
Notification broadcaster for this Model MBean. |
protected long |
notifierSequence
Notification sequence number for generic Model MBean notifications. |
protected PersistenceManager (src) |
persistence
Persistence manager. |
protected java.lang.String |
resourceType
The resource type string of the managed resource, such as ModelMBeanConstants.OBJECT_REF or
XMBeanConstants.STANDARD_INTERFACE . |
Fields inherited from class org.jboss.mx.server.AbstractMBeanInvoker (src) |
attributeContextMap, constructorContextMap, dynamicResource, getMBeanInfoCtx, info, operationContextMap, postDeregisterCtx, postRegisterCtx, preDeregisterCtx, preRegisterCtx, resourceEntry |
Constructor Summary | |
ModelMBeanInvoker()
Default constructor. |
|
ModelMBeanInvoker(ModelMBeanInfo (src) info)
Creates a Model MBean instance and initializes it with the given Model MBean metadata. |
Method Summary | |
void |
addAttributeChangeNotificationListener(NotificationListener (src) listener,
java.lang.String attributeName,
java.lang.Object handback)
|
void |
addNotificationListener(NotificationListener (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
Add a listener to an MBean. |
protected void |
configureInterceptorStack(ModelMBeanInfo (src) info,
MBeanServer (src) server,
ObjectName (src) name)
Build the getMBeanInfo, operation, and attribute interceptor stacks and associated these with the corresponding InvocationContexts. |
protected java.util.List |
getInterceptors(Descriptor (src) d)
|
MBeanNotificationInfo (src) [] |
getNotificationInfo()
Returns the notification metadata associated with the MBean. |
protected void |
init(MBeanServer (src) server,
ObjectName (src) name)
|
protected void |
initAttributeContexts(MBeanAttributeInfo (src) [] attributes)
|
protected void |
initOperationContexts(MBeanOperationInfo (src) [] operations)
|
protected void |
initPersistence(MBeanServer (src) server,
ObjectName (src) name)
initializes the persistence manager based on the info for this bean. |
ObjectName (src) |
invokePreRegister(MBeanServer (src) server,
ObjectName (src) name)
The default implementation of preRegister invokes the configureInterceptorStack(javax.management.modelmbean.ModelMBeanInfo, javax.management.MBeanServer, javax.management.ObjectName) method which sets up the interceptors
for this Model MBean instance. |
protected boolean |
isSupportedResourceType(java.lang.Object resource,
java.lang.String resourceType)
|
void |
load()
Retrieves the MBean's state from a persistence store. |
protected void |
override(Invocation (src) invocation)
Placeholder to allow subclasses to override the invocation |
void |
removeAttributeChangeNotificationListener(NotificationListener (src) listener,
java.lang.String attributeName)
|
void |
removeNotificationListener(NotificationListener (src) listener)
Removes a listener from an MBean. |
void |
removeNotificationListener(NotificationListener (src) listener,
NotificationFilter (src) filter,
java.lang.Object handback)
Removes a listener from the Emitter. |
void |
sendAttributeChangeNotification(Attribute (src) oldValue,
Attribute (src) newValue)
Sends an attribute change notification. |
void |
sendAttributeChangeNotification(AttributeChangeNotification (src) notification)
Sends an attribute change notification. |
void |
sendNotification(Notification (src) ntfyObj)
Sends a notification. |
void |
sendNotification(java.lang.String ntfyText)
Sends a notification with a given string message. |
void |
setManagedResource(java.lang.Object ref,
java.lang.String resourceType)
Sets the managed resource for this Model MBean instance. |
void |
setModelMBeanInfo(ModelMBeanInfo (src) info)
Sets the MBean metadata for this Model MBean instance. |
protected void |
setValuesFromMBeanInfo()
|
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 |
Methods inherited from interface javax.management.DynamicMBean (src) |
getAttribute, getAttributes, getMBeanInfo, invoke, setAttribute, setAttributes |
Field Detail |
protected java.lang.String resourceType
ModelMBeanConstants.OBJECT_REF
or
XMBeanConstants.STANDARD_INTERFACE
. This type string can be
used by the invoker to determine the behavior implemented by the
invocation chain and how the managed resource is exposed to the client
programs.
protected PersistenceManager (src) persistence
protected JBossNotificationBroadcasterSupport (src) notifier
protected long notifierSequence
protected long attrNotifierSequence
Constructor Detail |
public ModelMBeanInvoker()
public ModelMBeanInvoker(ModelMBeanInfo (src) info) throws MBeanException (src)
info
- Model MBean metadataMethod Detail |
public void setModelMBeanInfo(ModelMBeanInfo (src) info) throws MBeanException (src) , RuntimeOperationsException (src)
setModelMBeanInfo
in interface ModelMBean (src)
info
- Model MBean metadata
MBeanException (src)
RuntimeOperationsException (src)
public void setManagedResource(java.lang.Object ref, java.lang.String resourceType) throws MBeanException (src) , InstanceNotFoundException (src) , InvalidTargetObjectTypeException (src)
isSupportedResourceType(java.lang.Object, java.lang.String)
for more information).
setManagedResource
in interface ModelMBean (src)
ref
- reference to the managed resourceresourceType
- resource type identification string
MBeanException (src)
InstanceNotFoundException (src)
InvalidTargetObjectTypeException (src)
public void addNotificationListener(NotificationListener (src) listener, NotificationFilter (src) filter, java.lang.Object handback)
NotificationBroadcaster (src)
addNotificationListener
in interface NotificationBroadcaster (src)
addNotificationListener
in class AbstractMBeanInvoker (src)
public void removeNotificationListener(NotificationListener (src) listener) throws ListenerNotFoundException (src)
NotificationBroadcaster (src)
removeNotificationListener
in interface NotificationBroadcaster (src)
removeNotificationListener
in class AbstractMBeanInvoker (src)
ListenerNotFoundException (src)
public void removeNotificationListener(NotificationListener (src) listener, NotificationFilter (src) filter, java.lang.Object handback) throws ListenerNotFoundException (src)
NotificationEmitter (src)
Only the listener, filter, handback triplet is removed
removeNotificationListener
in interface NotificationEmitter (src)
removeNotificationListener
in class AbstractMBeanInvoker (src)
ListenerNotFoundException (src)
public void sendNotification(java.lang.String ntfyText) throws MBeanException (src) , RuntimeOperationsException (src)
GENERIC_MODELMBEAN_NOTIFICATION
.
sendNotification
in interface ModelMBeanNotificationBroadcaster (src)
ntfyText
- notification message
MBeanException (src)
RuntimeOperationsException (src)
public void sendNotification(Notification (src) ntfyObj) throws MBeanException (src) , RuntimeOperationsException (src)
sendNotification
in interface ModelMBeanNotificationBroadcaster (src)
ntfyObj
- notification to send
MBeanException (src)
RuntimeOperationsException (src)
public void sendAttributeChangeNotification(AttributeChangeNotification (src) notification) throws MBeanException (src)
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster (src)
notification
- attribute change notification to send
MBeanException (src)
public void sendAttributeChangeNotification(Attribute (src) oldValue, Attribute (src) newValue) throws MBeanException (src) , RuntimeOperationsException (src)
sendAttributeChangeNotification
in interface ModelMBeanNotificationBroadcaster (src)
oldValue
- attribute with the old valuenewValue
- attribute with the new value
java.lang.IllegalArgumentException
- - An Attribute object passed in parameter
is null or the names of the two Attribute objects in parameter are not
the same.
MBeanException (src)
RuntimeOperationsException (src)
public MBeanNotificationInfo (src) [] getNotificationInfo()
NotificationBroadcaster (src)
getNotificationInfo
in interface NotificationBroadcaster (src)
getNotificationInfo
in class AbstractMBeanInvoker (src)
public void addAttributeChangeNotificationListener(NotificationListener (src) listener, java.lang.String attributeName, java.lang.Object handback) throws MBeanException (src)
addAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster (src)
MBeanException (src)
public void removeAttributeChangeNotificationListener(NotificationListener (src) listener, java.lang.String attributeName) throws MBeanException (src) , ListenerNotFoundException (src)
removeAttributeChangeNotificationListener
in interface ModelMBeanNotificationBroadcaster (src)
MBeanException (src)
ListenerNotFoundException (src)
public void load() throws MBeanException (src) , InstanceNotFoundException (src)
PersistentMBean (src)
load
in interface PersistentMBean (src)
InstanceNotFoundException (src)
- if the MBean's state could not be found
MBeanException (src)
- wraps application exceptions from persistence storepublic void store() throws MBeanException (src) , InstanceNotFoundException (src)
PersistentMBean (src)
store
in interface PersistentMBean (src)
MBeanException (src)
- wraps application exceptions from persistence store
InstanceNotFoundException (src)
- if the MBean's state could not be storedpublic ObjectName (src) invokePreRegister(MBeanServer (src) server, ObjectName (src) name) throws java.lang.Exception
configureInterceptorStack(javax.management.modelmbean.ModelMBeanInfo, javax.management.MBeanServer, javax.management.ObjectName)
method which sets up the interceptors
for this Model MBean instance. Subclasses may override the
configureInterceptorStack() method to implement their own
interceptor stack configurations. See the JavaDoc for
configureInterceptorStack() for more information.
After the interceptor configuration, this implementation invokes the
load()
method on this Model MBean instance. This will attempt
to load a pre-existing management attribute state for this Model MBean
instance. See the Javadoc for load() for more information.
invokePreRegister
in class AbstractMBeanInvoker (src)
java.lang.Exception
protected void init(MBeanServer (src) server, ObjectName (src) name) throws java.lang.Exception
server
- name
-
java.lang.Exception
protected void initPersistence(MBeanServer (src) server, ObjectName (src) name) throws MBeanException (src) , InstanceNotFoundException (src)
MBeanException (src)
InstanceNotFoundException (src)
protected void initOperationContexts(MBeanOperationInfo (src) [] operations)
initOperationContexts
in class AbstractMBeanInvoker (src)
protected void initAttributeContexts(MBeanAttributeInfo (src) [] attributes)
initAttributeContexts
in class AbstractMBeanInvoker (src)
protected void configureInterceptorStack(ModelMBeanInfo (src) info, MBeanServer (src) server, ObjectName (src) name) throws java.lang.Exception
info
- - the ModelMBean metadataserver
- - the MBeanServer the ModelMBean is registering withname
- - the ModelMBean name
java.lang.Exception
protected java.util.List getInterceptors(Descriptor (src) d) throws java.lang.Exception
d
-
java.lang.Exception
protected void setValuesFromMBeanInfo() throws JMException (src)
JMException (src)
protected boolean isSupportedResourceType(java.lang.Object resource, java.lang.String resourceType)
protected void override(Invocation (src) invocation) throws MBeanException (src)
AbstractMBeanInvoker (src)
override
in class AbstractMBeanInvoker (src)
invocation
- the invocation
MBeanException (src)
- for any error
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |