javax.management
Interface DynamicMBean

All Known Subinterfaces:
ModelMBean
All Known Implementing Classes:
AbstractDynamicMBean

public interface DynamicMBean

Defines methods that should be implemented by a Dynamic MBean

Version:
$Revision: 1.3 $
Author:
Simone Bordet

Method Summary
 java.lang.Object getAttribute(java.lang.String attribute)
          Returns the value of the given attribute.
 AttributeList getAttributes(java.lang.String[] attributes)
          Returns an AttributeList given an array of attributes.
 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 setAttribute(Attribute attribute)
          Set the value of the specific attribute
 AttributeList setAttributes(AttributeList attributes)
          Set the attribute using the given attribute as an AttributeList
 

Method Detail

getMBeanInfo

public MBeanInfo getMBeanInfo()
Provides the exposed attributes/actions of this DynamicMBean
Returns:
MBeanInfo an instance of MBeanInfo

getAttribute

public java.lang.Object getAttribute(java.lang.String attribute)
                              throws AttributeNotFoundException,
                                     MBeanException,
                                     ReflectionException
Returns the value of the given attribute.
Parameters:
attribute - The attribute name for the value being retrieved.
Returns:
Object The value of the attribute.
Throws:
AttributeNotFoundException - If the given attribute isn't found.
MBeanException - Wraps a java.lang.Exception
ReflectionException - Wraps a java.lang.Exception while trying to invoke the getter.

setAttribute

public void setAttribute(Attribute attribute)
                  throws AttributeNotFoundException,
                         InvalidAttributeValueException,
                         MBeanException,
                         ReflectionException
Set the value of the specific attribute
Parameters:
attribute - The Attribute being set.
Throws:
AttributeNotFoundException -  
InvalidAttributeValueException -  
MBeanException - Wraps a java.lang.Exception which is thrown by the setter.

getAttributes

public AttributeList getAttributes(java.lang.String[] attributes)
Returns an AttributeList given an array of attributes.
Parameters:
attributes - The array of attributes being retrieved
Returns:
AttributeList The list of Attribute

setAttributes

public AttributeList setAttributes(AttributeList attributes)
Set the attribute using the given attribute as an AttributeList
Parameters:
attributes - The attribute being set.
Returns:
AttributeList the list of Attribute successfully set.

invoke

public java.lang.Object invoke(java.lang.String method,
                               java.lang.Object[] arguments,
                               java.lang.String[] params)
                        throws MBeanException,
                               ReflectionException
Invoke the given method.
Parameters:
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.
Returns:
Object The object returned by the invocaton.
Throws:
MBeanException - Wraps a java.lang.Exception
ReflectionException -  


Copyright © 2001-2002 MX4J Team. All Rights Reserved.