Package com.germinus.easyconf.jmx
Class ComponentConfigurationDynamicMBean
java.lang.Object
com.germinus.easyconf.jmx.ComponentConfigurationDynamicMBean
- All Implemented Interfaces:
DynamicMBean
MBean wrapper for a ComponentConfiguration. View Source
- Version:
- $Revision: 1.4 $
- Author:
- Alvaro Gonz�lez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MBeanAttributeInfo[]
private ComponentConfiguration
private String
private static final String
private MBeanConstructorInfo[]
private Map
private static final String
private static final String
static final String
Name of the newProperty operations.static final String[]
Signature of the newProperty operation with one parameter.static final String[]
Signature of the newProperty operation with two parameters.private Map
private MBeanOperationInfo[]
private static final String
static final String
Name of the reloadConfiguration operation.static final String[]
Signature of the reloadConfiguration operation. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a MBean wraping some loaded ComponentConfigurationComponentConfigurationDynamicMBean
(String componentName) Loads and wraps a ComponentConfiguration -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute
(String attributeName) Obtains the component attributes from the ComponentCongigurationprotected MBeanAttributeInfo[]
Constructs the info of the MBean's attributes.getAttributes
(String[] attributesNames) List named attributesprotected ComponentConfiguration
Returns the ComponentConfiguration associated with this MBean.protected MBeanConstructorInfo[]
Constructs an array of the MBean's constructors.Return the Information exposed by the MBean: Attributes, Operations, Constructors and Notifications.protected MBeanOperationInfo[]
Constructs the info of the MBean's operations.private void
init()
Some initializations common to both constructorsInvoke one of the operations exposed by the MBeanas.private void
newProperty
(String propertyName) private void
newProperty
(String propertyName, Object value) private boolean
propertyExists
(String property) private void
void
setAttribute
(Attribute attribute) Sets an attributesetAttributes
(AttributeList attributes) Set named attributesprotected void
setComponentConfiguration
(ComponentConfiguration componentConfiguration)
-
Field Details
-
RELOAD_OPERATION_NAME
Name of the reloadConfiguration operation. Used when invokinginvoke
method.- See Also:
-
NEW_PROPERTY_OPERATION_NAME
Name of the newProperty operations. Used when invokinginvoke
method.- See Also:
-
RELOAD_OPERATION_SIGNATURE
Signature of the reloadConfiguration operation. Used when invokinginvoke
method. -
NEW_PROPERTY_OPERATION_SIGNATURE_1
Signature of the newProperty operation with one parameter. Used when invokinginvoke
method. -
NEW_PROPERTY_OPERATION_SIGNATURE_2
Signature of the newProperty operation with two parameters. Used when invokinginvoke
method. -
NEW_PROPERTY_OPERATION_DESCRIPTION_1
- See Also:
-
NEW_PROPERTY_OPERATION_DESCRIPTION_2
- See Also:
-
RELOAD_OPERATION_DESCRIPTION
- See Also:
-
CONSTRUCTOR_DESCRIPTION_1
- See Also:
-
componentName
-
componentConfiguration
-
attributesInfo
-
modifiedProperties
-
newPropeties
-
operationInfo
-
constructorsInfo
-
-
Constructor Details
-
ComponentConfigurationDynamicMBean
Create a MBean wraping some loaded ComponentConfiguration- Parameters:
component
-
-
ComponentConfigurationDynamicMBean
Loads and wraps a ComponentConfiguration- Parameters:
componentName
-
-
-
Method Details
-
init
private void init()Some initializations common to both constructors -
getAttribute
public Object getAttribute(String attributeName) throws AttributeNotFoundException, MBeanException, ReflectionException Obtains the component attributes from the ComponentCongiguration- Specified by:
getAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
MBeanException
ReflectionException
- See Also:
-
setAttribute
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException Sets an attribute- Specified by:
setAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
- See Also:
-
getAttributes
List named attributes- Specified by:
getAttributes
in interfaceDynamicMBean
- See Also:
-
setAttributes
Set named attributes- Specified by:
setAttributes
in interfaceDynamicMBean
- See Also:
-
invoke
public Object invoke(String operationName, Object[] params, String[] signature) throws MBeanException, ReflectionException Invoke one of the operations exposed by the MBeanas. This Operations could be one of:void newProperty(String propertyName)
-
void newProperty(String propertyName, String initialValue)
void reloadConfiguration()
- Specified by:
invoke
in interfaceDynamicMBean
- Throws:
MBeanException
ReflectionException
- See Also:
-
reloadConfiguration
private void reloadConfiguration() -
newProperty
- Throws:
MBeanException
-
newProperty
- Throws:
MBeanException
-
getMBeanInfo
Return the Information exposed by the MBean: Attributes, Operations, Constructors and Notifications.- Specified by:
getMBeanInfo
in interfaceDynamicMBean
- See Also:
-
getAttributeInfo
Constructs the info of the MBean's attributes.- Returns:
- Array of MBeanAttributeInfo
-
getOperationInfo
Constructs the info of the MBean's operations.- Returns:
- Array of MBeanOperationInfo
-
getConsturctorsInfo
Constructs an array of the MBean's constructors.- Returns:
- Array of MBeanConstructorInfo
-
getComponentConfiguration
Returns the ComponentConfiguration associated with this MBean.- Returns:
- ComponentConfiguration.
-
setComponentConfiguration
- Parameters:
componentConfiguration
- The componentConfiguration to set.
-
propertyExists
-