org.jboss.mx.modelmbean
Class RequiredModelMBeanInvoker

java.lang.Object
  extended by org.jboss.mx.server.AbstractMBeanInvoker
      extended by org.jboss.mx.server.RawDynamicInvoker
          extended by org.jboss.mx.modelmbean.RequiredModelMBeanInvoker
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, NotificationBroadcaster, NotificationEmitter, Interceptable, MBeanInvoker, Suspendable

public class RequiredModelMBeanInvoker
extends RawDynamicInvoker

An invoker that handles the 'ops' that are part of the RequiredModelMBean that must be handled at that level rather than its delegate.

Version:
$Revison:$
Author:
Scott.Stark@jboss.org

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.mx.server.AbstractMBeanInvoker
AbstractMBeanInvoker.OperationKey
 
Field Summary
 
Fields inherited from class org.jboss.mx.server.AbstractMBeanInvoker
attributeContextMap, constructorContextMap, dynamicResource, getMBeanInfoCtx, info, log, operationContextMap, postDeregisterCtx, postRegisterCtx, preDeregisterCtx, preRegisterCtx, resourceEntry
 
Constructor Summary
RequiredModelMBeanInvoker(DynamicMBean resource)
           
 
Method Summary
 Object getAttribute(String name)
          Returns an attribte value.
 AttributeList getAttributes(String[] attributes)
          Returns the values of the attributes with names matching the passed string array.
 Object invoke(String name, Object[] args, String[] signature)
          Invokes the target resource.
 void setAttribute(Attribute attribute)
          Sets an attribute value.
 AttributeList setAttributes(AttributeList attributes)
          Sets the values of the attributes passed as an AttributeList of name and new value pairs.
 
Methods inherited from class org.jboss.mx.server.RawDynamicInvoker
getMBeanInfo, postDeregister, postRegister, preDeregister, preRegister
 
Methods inherited from class org.jboss.mx.server.AbstractMBeanInvoker
addNotificationListener, addNotificationListenerToResource, addOperationInterceptor, getInvocationTimeout, getMBeanEntry, getMetaData, getNotificationInfo, getNotificationInfoFromResource, getObjectName, getResource, getServer, getSignatureString, initAttributeContexts, initDispatchers, initOperationContexts, inject, invokePostDeregister, invokePostRegister, invokePreDeregister, invokePreRegister, isSuspended, override, removeNotificationListener, removeNotificationListener, removeNotificationListenerFromResource, removeNotificationListenerFromResource, removeOperationInterceptor, 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

RequiredModelMBeanInvoker

public RequiredModelMBeanInvoker(DynamicMBean resource)
Method Detail

getAttribute

public Object getAttribute(String name)
                    throws AttributeNotFoundException,
                           MBeanException,
                           ReflectionException
Description copied from class: AbstractMBeanInvoker
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
Overrides:
getAttribute in class RawDynamicInvoker
Parameters:
name - attribute name
Returns:
attribute value
Throws:
AttributeNotFoundException - if the requested attribute is not part of the MBean's management interface
MBeanException - if retrieving the attribute value causes an application exception
ReflectionException - if there was an error trying to retrieve the attribute value

setAttribute

public void setAttribute(Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Description copied from class: AbstractMBeanInvoker
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
Overrides:
setAttribute in class RawDynamicInvoker
Parameters:
attribute - new attribute value
Throws:
AttributeNotFoundException - if the requested attribute is not part of the MBean's management interface
InvalidAttributeValueException - if the attribute contains a value not suitable for the attribute
MBeanException - if setting the attribute value causes an application exception
ReflectionException - if there was an error trying to set the attribute value.
See Also:
Attribute

getAttributes

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

Specified by:
getAttributes in interface DynamicMBean
Overrides:
getAttributes in class RawDynamicInvoker
Parameters:
attributes - the names of the attribute.
Returns:
an AttributeList of name and value pairs.

setAttributes

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

Specified by:
setAttributes in interface DynamicMBean
Overrides:
setAttributes in class RawDynamicInvoker
Parameters:
attributes - the name an new value pairs.
Returns:
an AttributeList of name and value pairs that were actually set.

invoke

public Object invoke(String name,
                     Object[] args,
                     String[] signature)
              throws MBeanException,
                     ReflectionException
Description copied from class: AbstractMBeanInvoker
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
Overrides:
invoke in class RawDynamicInvoker
Parameters:
name - name of the target method
args - argumetns for the target method
signature - signature of the target method
Returns:
the result of the operation.
Throws:
MBeanException - if the target method raised a hecked exception
ReflectionException - if there was an error trying to resolve or invoke the target method


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.