xmlBlaster 2.2.0 API

org.xmlBlaster.util.admin.extern
Class JmxProperties

java.lang.Object
  extended by org.xmlBlaster.util.admin.extern.JmxProperties
All Implemented Interfaces:
javax.management.DynamicMBean

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

Definition of a dynamic MBean which exports the Global properties. The "JmxProperties" dynamic MBean shows how to expose for management attributes and operations, at runtime, by implementing the "javax.management.DynamicMBean" interface. This MBean exposes for management all glob.getProperty() key/values. - the read/write attribute, - the read only attribute, - the "set()" operation. It does so by putting this information in an MBeanInfo object that is returned by the getMBeanInfo() method of the DynamicMBean interface. It implements the access to its attributes through the getAttribute(), getAttributes(), setAttribute(), and setAttributes() methods of the DynamicMBean interface. It implements the invocation of its set() operation through the invoke() method of the DynamicMBean interface. Note that as "JmxProperties" explicitly defines one constructor, this constructor must be public and exposed for management through the MBeanInfo object.

Since:
1.0.4

Field Summary
private  javax.management.MBeanAttributeInfo[] dAttributes
           
private  java.lang.String dClassName
           
private  javax.management.MBeanConstructorInfo[] dConstructors
           
private  javax.management.MBeanInfo dMBeanInfo
           
private  Global glob
           
private static java.util.logging.Logger log
           
private  java.lang.String ME
           
private  int numProperties
           
 
Constructor Summary
JmxProperties()
          Export all properties from glob.
JmxProperties(Global glob)
          Export all properties from glob.
 
Method Summary
private  void buildDynamicMBeanInfo()
          Build the private dMBeanInfo field, which represents the management interface exposed by the MBean; that is, the set of attributes, constructors, operations and notifications which are available for management.
 java.lang.Object getAttribute(java.lang.String attribute_name)
          Allows the value of the specified attribute of the Dynamic MBean to be obtained.
 javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
          Enables the to get the values of several attributes of the Dynamic MBean.
 javax.management.MBeanInfo getMBeanInfo()
          This method provides the exposed attributes and operations of the Dynamic MBean.
 java.lang.Object invoke(java.lang.String operationName, java.lang.Object[] params, java.lang.String[] signature)
          Allows an operation to be invoked on the Dynamic MBean.
private  boolean isReadOnly(java.lang.String name)
           
 void setAttribute(javax.management.Attribute attribute)
          Sets the value of the specified attribute of the Dynamic MBean.
 javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
          Sets the values of several attributes of the Dynamic MBean, and returns the list of attributes that have been set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

glob

private Global glob

log

private static java.util.logging.Logger log

ME

private final java.lang.String ME
See Also:
Constant Field Values

dClassName

private java.lang.String dClassName

dAttributes

private javax.management.MBeanAttributeInfo[] dAttributes

dConstructors

private javax.management.MBeanConstructorInfo[] dConstructors

dMBeanInfo

private javax.management.MBeanInfo dMBeanInfo

numProperties

private int numProperties
Constructor Detail

JmxProperties

public JmxProperties()
Export all properties from glob.


JmxProperties

public JmxProperties(Global glob)
Export all properties from glob.

Method Detail

getAttribute

public java.lang.Object getAttribute(java.lang.String attribute_name)
                              throws javax.management.AttributeNotFoundException,
                                     javax.management.MBeanException,
                                     javax.management.ReflectionException
Allows the value of the specified attribute of the Dynamic MBean to be obtained.

Specified by:
getAttribute in interface javax.management.DynamicMBean
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

setAttribute

public void setAttribute(javax.management.Attribute attribute)
                  throws javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException
Sets the value of the specified attribute of the Dynamic MBean.

Specified by:
setAttribute in interface javax.management.DynamicMBean
Throws:
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException

isReadOnly

private boolean isReadOnly(java.lang.String name)

getAttributes

public javax.management.AttributeList getAttributes(java.lang.String[] attributeNames)
Enables the to get the values of several attributes of the Dynamic MBean.

Specified by:
getAttributes in interface javax.management.DynamicMBean

setAttributes

public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
Sets the values of several attributes of the Dynamic MBean, and returns the list of attributes that have been set.

Specified by:
setAttributes in interface javax.management.DynamicMBean

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
Allows an operation to be invoked on the Dynamic MBean.

Specified by:
invoke in interface javax.management.DynamicMBean
Throws:
javax.management.MBeanException
javax.management.ReflectionException

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo()
This method provides the exposed attributes and operations of the Dynamic MBean. It provides this information using an MBeanInfo object.

Specified by:
getMBeanInfo in interface javax.management.DynamicMBean

buildDynamicMBeanInfo

private void buildDynamicMBeanInfo()
Build the private dMBeanInfo field, which represents the management interface exposed by the MBean; that is, the set of attributes, constructors, operations and notifications which are available for management. A reference to the dMBeanInfo object is returned by the getMBeanInfo() method of the DynamicMBean interface. Note that, once constructed, an MBeanInfo object is immutable.


xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.