com.germinus.easyconf.jmx
Class ComponentConfigurationDynamicMBean

java.lang.Object
  extended bycom.germinus.easyconf.jmx.ComponentConfigurationDynamicMBean
All Implemented Interfaces:
javax.management.DynamicMBean

public class ComponentConfigurationDynamicMBean
extends java.lang.Object
implements javax.management.DynamicMBean

MBean wrapper for a ComponentConfiguration. View Source

Version:
$Revision: 1.4 $
Author:
Alvaro Gonz?lez

Field Summary
static java.lang.String NEW_PROPERTY_OPERATION_NAME
          Name of the newProperty operations.
static java.lang.String[] NEW_PROPERTY_OPERATION_SIGNATURE_1
          Signature of the newProperty operation with one parameter.
static java.lang.String[] NEW_PROPERTY_OPERATION_SIGNATURE_2
          Signature of the newProperty operation with two parameters.
static java.lang.String RELOAD_OPERATION_NAME
          Name of the reloadConfiguration operation.
static java.lang.String[] RELOAD_OPERATION_SIGNATURE
          Signature of the reloadConfiguration operation.
 
Constructor Summary
ComponentConfigurationDynamicMBean(ComponentConfiguration component)
          Create a MBean wraping some loaded ComponentConfiguration
ComponentConfigurationDynamicMBean(java.lang.String componentName)
          Loads and wraps a ComponentConfiguration
 
Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
          Obtains the component attributes from the ComponentCongiguration
protected  javax.management.MBeanAttributeInfo[] getAttributeInfo()
          Constructs the info of the MBean's attributes.
 javax.management.AttributeList getAttributes(java.lang.String[] attributesNames)
          List named attributes
protected  ComponentConfiguration getComponentConfiguration()
          Returns the ComponentConfiguration associated with this MBean.
protected  javax.management.MBeanConstructorInfo[] getConsturctorsInfo()
          Constructs an array of the MBean's constructors.
 javax.management.MBeanInfo getMBeanInfo()
          Return the Information exposed by the MBean: Attributes, Operations, Constructors and Notifications.
protected  javax.management.MBeanOperationInfo[] getOperationInfo()
          Constructs the info of the MBean's operations.
 java.lang.Object invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
          Invoke one of the operations exposed by the MBeanas.
 void setAttribute(javax.management.Attribute attribute)
          Sets an attribute
 javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
          Set named attributes
protected  void setComponentConfiguration(ComponentConfiguration componentConfiguration)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RELOAD_OPERATION_NAME

public static final java.lang.String RELOAD_OPERATION_NAME
Name of the reloadConfiguration operation. Used when invoking invoke method.

See Also:
Constant Field Values

NEW_PROPERTY_OPERATION_NAME

public static final java.lang.String NEW_PROPERTY_OPERATION_NAME
Name of the newProperty operations. Used when invoking invoke method.

See Also:
Constant Field Values

RELOAD_OPERATION_SIGNATURE

public static final java.lang.String[] RELOAD_OPERATION_SIGNATURE
Signature of the reloadConfiguration operation. Used when invoking invoke method.


NEW_PROPERTY_OPERATION_SIGNATURE_1

public static final java.lang.String[] NEW_PROPERTY_OPERATION_SIGNATURE_1
Signature of the newProperty operation with one parameter. Used when invoking invoke method.


NEW_PROPERTY_OPERATION_SIGNATURE_2

public static final java.lang.String[] NEW_PROPERTY_OPERATION_SIGNATURE_2
Signature of the newProperty operation with two parameters. Used when invoking invoke method.

Constructor Detail

ComponentConfigurationDynamicMBean

public ComponentConfigurationDynamicMBean(ComponentConfiguration component)
Create a MBean wraping some loaded ComponentConfiguration

Parameters:
component -

ComponentConfigurationDynamicMBean

public ComponentConfigurationDynamicMBean(java.lang.String componentName)
Loads and wraps a ComponentConfiguration

Parameters:
componentName -
Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String attributeName)
                              throws javax.management.AttributeNotFoundException,
                                     javax.management.MBeanException,
                                     javax.management.ReflectionException
Obtains the component attributes from the ComponentCongiguration

Specified by:
getAttribute in interface javax.management.DynamicMBean
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
See Also:
DynamicMBean.getAttribute(java.lang.String)

setAttribute

public void setAttribute(javax.management.Attribute attribute)
                  throws javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException
Sets an attribute

Specified by:
setAttribute in interface javax.management.DynamicMBean
Throws:
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
See Also:
DynamicMBean.setAttribute(javax.management.Attribute)

getAttributes

public javax.management.AttributeList getAttributes(java.lang.String[] attributesNames)
List named attributes

Specified by:
getAttributes in interface javax.management.DynamicMBean
See Also:
DynamicMBean.getAttributes(java.lang.String[])

setAttributes

public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
Set named attributes

Specified by:
setAttributes in interface javax.management.DynamicMBean
See Also:
DynamicMBean.setAttributes(javax.management.AttributeList)

invoke

public java.lang.Object invoke(java.lang.String operationName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws javax.management.MBeanException,
                               javax.management.ReflectionException
Invoke one of the operations exposed by the MBeanas. This Operations could be one of:

Specified by:
invoke in interface javax.management.DynamicMBean
Throws:
javax.management.MBeanException
javax.management.ReflectionException
See Also:
DynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo()
Return the Information exposed by the MBean: Attributes, Operations, Constructors and Notifications.

Specified by:
getMBeanInfo in interface javax.management.DynamicMBean
See Also:
DynamicMBean.getMBeanInfo()

getAttributeInfo

protected javax.management.MBeanAttributeInfo[] getAttributeInfo()
Constructs the info of the MBean's attributes.

Returns:
Array of MBeanAttributeInfo

getOperationInfo

protected javax.management.MBeanOperationInfo[] getOperationInfo()
Constructs the info of the MBean's operations.

Returns:
Array of MBeanOperationInfo

getConsturctorsInfo

protected javax.management.MBeanConstructorInfo[] getConsturctorsInfo()
Constructs an array of the MBean's constructors.

Returns:
Array of MBeanConstructorInfo

getComponentConfiguration

protected ComponentConfiguration getComponentConfiguration()
Returns the ComponentConfiguration associated with this MBean.

Returns:
ComponentConfiguration.

setComponentConfiguration

protected void setComponentConfiguration(ComponentConfiguration componentConfiguration)
Parameters:
componentConfiguration - The componentConfiguration to set.


Copyright © 2005 EasyConf team. All Rights Reserved.