org.jboss.mx.server
Class RawDynamicInvoker

java.lang.Object
  extended byorg.jboss.mx.server.AbstractMBeanInvoker (src) 
      extended byorg.jboss.mx.server.RawDynamicInvoker
All Implemented Interfaces:
DynamicMBean (src) , MBeanInvoker (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Suspendable (src)
Direct Known Subclasses:
RequiredModelMBeanInvoker (src)

public class RawDynamicInvoker
extends AbstractMBeanInvoker (src)


Nested Class Summary
 
Nested classes inherited from class org.jboss.mx.server.AbstractMBeanInvoker (src)
AbstractMBeanInvoker.OperationKey (src)
 
Field Summary
 
Fields inherited from class org.jboss.mx.server.AbstractMBeanInvoker (src)
attributeContextMap, constructorContextMap, dynamicResource, getMBeanInfoCtx, info, log, operationContextMap, postDeregisterCtx, postRegisterCtx, preDeregisterCtx, preRegisterCtx, resourceEntry
 
Constructor Summary
RawDynamicInvoker(DynamicMBean (src)  resource)
           
 
Method Summary
 java.lang.Object getAttribute(java.lang.String name)
          Returns an attribte value.
 AttributeList (src) getAttributes(java.lang.String[] attributes)
          Returns the values of the attributes with names matching the passed string array.
 MBeanInfo (src) getMBeanInfo()
          Returns the management interface that describes this dynamic resource.
 java.lang.Object invoke(java.lang.String name, java.lang.Object[] args, java.lang.String[] signature)
          Invokes the target resource.
 void postDeregister()
          This method is called by the MBeanServer after deregistration takes place.
 void postRegister(java.lang.Boolean b)
          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 (src) preRegister(MBeanServer (src)  server, ObjectName (src)  oname)
          Initializes this invoker.
 void setAttribute(Attribute (src)  attribute)
          Sets an attribute value.
 AttributeList (src) setAttributes(AttributeList (src)  attributes)
          Sets the values of the attributes passed as an AttributeList (src) of name and new value pairs.
 
Methods inherited from class org.jboss.mx.server.AbstractMBeanInvoker (src)
addNotificationListener, addNotificationListenerToResource, getInvocationTimeout, getMBeanEntry, getMetaData, getNotificationInfo, getNotificationInfoFromResource, getObjectName, getResource, getServer, getSignatureString, initAttributeContexts, initDispatchers, initOperationContexts, inject, invokePostDeregister, invokePostRegister, invokePreDeregister, invokePreRegister, isSuspended, override, removeNotificationListener, removeNotificationListener, removeNotificationListenerFromResource, removeNotificationListenerFromResource, resume, setInvocationTimeout, setMBeanEntry, setResource, suspend, suspend, suspend, updateAttributeInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RawDynamicInvoker

public RawDynamicInvoker(DynamicMBean (src)  resource)
Method Detail

setAttribute

public void setAttribute(Attribute (src)  attribute)
                  throws AttributeNotFoundException (src) ,
                         InvalidAttributeValueException (src) ,
                         MBeanException (src) ,
                         ReflectionException (src) 
Description copied from class: AbstractMBeanInvoker (src)
Sets an attribute value. The operation is forced through a set of interceptors before the new value for the attribute is set.

Specified by:
setAttribute in interface DynamicMBean (src)
Overrides:
setAttribute in class AbstractMBeanInvoker (src)
Parameters:
attribute - new attribute value
Throws:
AttributeNotFoundException (src) - if the requested attribute is not part of the MBean's management interface
ReflectionException (src) - if there was an error trying to set the attribute value.
InvalidAttributeValueException (src) - if the attribute contains a value not suitable for the attribute
MBeanException (src) - if setting the attribute value causes an application exception

setAttributes

public AttributeList (src)  setAttributes(AttributeList (src)  attributes)
Description copied from interface: DynamicMBean (src)
Sets the values of the attributes passed as an AttributeList (src) of name and new value pairs.

Specified by:
setAttributes in interface DynamicMBean (src)
Overrides:
setAttributes in class AbstractMBeanInvoker (src)

getAttribute

public java.lang.Object getAttribute(java.lang.String name)
                              throws AttributeNotFoundException (src) ,
                                     MBeanException (src) ,
                                     ReflectionException (src) 
Description copied from class: AbstractMBeanInvoker (src)
Returns an attribte value. The request for the value is forced through a set of interceptors before the value is returned.

Specified by:
getAttribute in interface DynamicMBean (src)
Overrides:
getAttribute in class AbstractMBeanInvoker (src)
Parameters:
name - attribute name
Returns:
attribute value
Throws:
AttributeNotFoundException (src) - if the requested attribute is not part of the MBean's management interface
MBeanException (src) - if retrieving the attribute value causes an application exception
ReflectionException (src) - if there was an error trying to retrieve the attribute value

getAttributes

public AttributeList (src)  getAttributes(java.lang.String[] attributes)
Description copied from interface: DynamicMBean (src)
Returns the values of the attributes with names matching the passed string array.

Specified by:
getAttributes in interface DynamicMBean (src)
Overrides:
getAttributes in class AbstractMBeanInvoker (src)

invoke

public java.lang.Object invoke(java.lang.String name,
                               java.lang.Object[] args,
                               java.lang.String[] signature)
                        throws MBeanException (src) ,
                               ReflectionException (src) 
Description copied from class: AbstractMBeanInvoker (src)
Invokes the target resource. The default invocation used by this invoker implement sends the invocation through a stack of interceptors before reaching the target method.

Specified by:
invoke in interface DynamicMBean (src)
Overrides:
invoke in class AbstractMBeanInvoker (src)
Parameters:
name - name of the target method
args - argumetns for the target method
signature - signature of the target method
Throws:
MBeanException (src) - if the target method raised a hecked exception
ReflectionException (src) - if there was an error trying to resolve or invoke the target method

getMBeanInfo

public MBeanInfo (src)  getMBeanInfo()
Description copied from interface: DynamicMBean (src)
Returns the management interface that describes this dynamic resource. It is the responsibility of the implementation to make sure the description is accurate.

Specified by:
getMBeanInfo in interface DynamicMBean (src)
Overrides:
getMBeanInfo in class AbstractMBeanInvoker (src)

preRegister

public ObjectName (src)  preRegister(MBeanServer (src)  server,
                              ObjectName (src)  oname)
                       throws java.lang.Exception
Description copied from class: AbstractMBeanInvoker (src)
Initializes this invoker. At the registration time we can be sure that all of the metadata is available and initialize the invoker and cache the data accordingly.

Subclasses that override the preRegister method must make sure they call super.preRegister() in their implementation to ensure proper initialization of the invoker.

Specified by:
preRegister in interface MBeanRegistration (src)
Overrides:
preRegister in class AbstractMBeanInvoker (src)
Throws:
java.lang.Exception

postRegister

public void postRegister(java.lang.Boolean b)
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer after registration takes place or when registration fails.

Specified by:
postRegister in interface MBeanRegistration (src)
Overrides:
postRegister in class AbstractMBeanInvoker (src)

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer before deregistration takes place.

The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.

Specified by:
preDeregister in interface MBeanRegistration (src)
Overrides:
preDeregister in class AbstractMBeanInvoker (src)
Throws:
java.lang.Exception

postDeregister

public void postDeregister()
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer after deregistration takes place.

Specified by:
postDeregister in interface MBeanRegistration (src)
Overrides:
postDeregister in class AbstractMBeanInvoker (src)