public class ComponentConfigurationDynamicMBean
extends java.lang.Object
implements javax.management.DynamicMBean
| Modifier and Type | Field and Description |
|---|---|
private javax.management.MBeanAttributeInfo[] |
attributesInfo |
private ComponentConfiguration |
componentConfiguration |
private java.lang.String |
componentName |
private static java.lang.String |
CONSTRUCTOR_DESCRIPTION_1 |
private javax.management.MBeanConstructorInfo[] |
constructorsInfo |
private java.util.Map |
modifiedProperties |
private static java.lang.String |
NEW_PROPERTY_OPERATION_DESCRIPTION_1 |
private static java.lang.String |
NEW_PROPERTY_OPERATION_DESCRIPTION_2 |
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.
|
private java.util.Map |
newPropeties |
private javax.management.MBeanOperationInfo[] |
operationInfo |
private static java.lang.String |
RELOAD_OPERATION_DESCRIPTION |
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 and Description |
|---|
ComponentConfigurationDynamicMBean(ComponentConfiguration component)
Create a MBean wraping some loaded ComponentConfiguration
|
ComponentConfigurationDynamicMBean(java.lang.String componentName)
Loads and wraps a ComponentConfiguration
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
private void |
init()
Some initializations common to both constructors
|
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.
|
private void |
newProperty(java.lang.String propertyName) |
private void |
newProperty(java.lang.String propertyName,
java.lang.Object value) |
private boolean |
propertyExists(java.lang.String property) |
private void |
reloadConfiguration() |
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) |
public static final java.lang.String RELOAD_OPERATION_NAME
invoke method.public static final java.lang.String NEW_PROPERTY_OPERATION_NAME
invoke method.public static final java.lang.String[] RELOAD_OPERATION_SIGNATURE
invoke method.public static final java.lang.String[] NEW_PROPERTY_OPERATION_SIGNATURE_1
invoke method.public static final java.lang.String[] NEW_PROPERTY_OPERATION_SIGNATURE_2
invoke method.private static final java.lang.String NEW_PROPERTY_OPERATION_DESCRIPTION_1
private static final java.lang.String NEW_PROPERTY_OPERATION_DESCRIPTION_2
private static final java.lang.String RELOAD_OPERATION_DESCRIPTION
private static final java.lang.String CONSTRUCTOR_DESCRIPTION_1
private java.lang.String componentName
private ComponentConfiguration componentConfiguration
private javax.management.MBeanAttributeInfo[] attributesInfo
private java.util.Map modifiedProperties
private java.util.Map newPropeties
private javax.management.MBeanOperationInfo[] operationInfo
private javax.management.MBeanConstructorInfo[] constructorsInfo
public ComponentConfigurationDynamicMBean(ComponentConfiguration component)
component - public ComponentConfigurationDynamicMBean(java.lang.String componentName)
componentName - private void init()
public java.lang.Object getAttribute(java.lang.String attributeName)
throws javax.management.AttributeNotFoundException,
javax.management.MBeanException,
javax.management.ReflectionException
getAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.getAttribute(java.lang.String)public void setAttribute(javax.management.Attribute attribute)
throws javax.management.AttributeNotFoundException,
javax.management.InvalidAttributeValueException,
javax.management.MBeanException,
javax.management.ReflectionException
setAttribute in interface javax.management.DynamicMBeanjavax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.setAttribute(javax.management.Attribute)public javax.management.AttributeList getAttributes(java.lang.String[] attributesNames)
getAttributes in interface javax.management.DynamicMBeanDynamicMBean.getAttributes(java.lang.String[])public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
setAttributes in interface javax.management.DynamicMBeanDynamicMBean.setAttributes(javax.management.AttributeList)public java.lang.Object invoke(java.lang.String operationName,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
void newProperty(String propertyName)void newProperty(String propertyName, String initialValue)
void reloadConfiguration()invoke in interface javax.management.DynamicMBeanjavax.management.MBeanExceptionjavax.management.ReflectionExceptionDynamicMBean.invoke(java.lang.String,
java.lang.Object[], java.lang.String[])private void reloadConfiguration()
private void newProperty(java.lang.String propertyName)
throws javax.management.MBeanException
javax.management.MBeanExceptionprivate void newProperty(java.lang.String propertyName,
java.lang.Object value)
throws javax.management.MBeanException
javax.management.MBeanExceptionpublic javax.management.MBeanInfo getMBeanInfo()
getMBeanInfo in interface javax.management.DynamicMBeanDynamicMBean.getMBeanInfo()protected javax.management.MBeanAttributeInfo[] getAttributeInfo()
protected javax.management.MBeanOperationInfo[] getOperationInfo()
protected javax.management.MBeanConstructorInfo[] getConsturctorsInfo()
protected ComponentConfiguration getComponentConfiguration()
protected void setComponentConfiguration(ComponentConfiguration componentConfiguration)
componentConfiguration - The componentConfiguration to set.private boolean propertyExists(java.lang.String property)