EAF 7.0 API

org.enhydra.util
Class EafConfigMBean

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byorg.enhydra.util.EafConfigMBean
All Implemented Interfaces:
javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter

public abstract class EafConfigMBean
extends javax.management.NotificationBroadcasterSupport
implements javax.management.DynamicMBean

EAF's Core MBean Implementation

Author:
Slobodan Vujasinovic

Field Summary
protected  java.util.Vector addedAttributes
           
protected  Application application
           
protected  com.lutris.util.Config config
           
protected  java.lang.String dClassName
           
protected  javax.management.MBeanInfo dMBeanInfo
           
static java.lang.String DOT
           
protected  java.util.Hashtable hashAttrib
           
protected  java.util.Hashtable initHashAttrib
           
protected  java.lang.String[] noteTypesAdd
           
protected  java.lang.String[] noteTypesChange
           
protected  java.lang.String[] noteTypesRemove
           
protected  java.lang.String[] noteTypesReset
           
protected  java.lang.String[] noteTypesSave
           
protected  javax.management.ObjectName objectName
           
protected  java.lang.String prefix
           
protected  long sequence
           
 
Constructor Summary
EafConfigMBean()
          A constructor with no arguments is required.
EafConfigMBean(Application application, javax.management.ObjectName objectName, java.lang.String prefix, java.lang.String[] includes, java.lang.String[] excludes)
           
 
Method Summary
 void addAttribute(java.lang.String name, java.lang.String value)
          Add new attribute to config
 void buildDynamicMBeanInfo()
           
 java.lang.String getAppInfo()
           
 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)
          get the values of several attributes of the Dynamic MBean.
protected  java.lang.String getDescription()
          Method returns MBean's description
protected  javax.management.MBeanAttributeInfo[] getMBeanAttributesInfo()
          Method returns MBean's MBeanAttributeInfo Array
protected  javax.management.MBeanConstructorInfo[] getMBeanConstructorInfo()
          Method returns MBean's MBeanConstructorInfo Array
 javax.management.MBeanInfo getMBeanInfo()
          This method provides the exposed attributes and operations of the Dynamic MBean.
protected  javax.management.MBeanNotificationInfo[] getMBeanNotificationInfo()
          Method returns MBean's MBeanNotificationInfo Array
protected  javax.management.MBeanOperationInfo[] getMBeanOperationsInfo()
          Method returns MBean's MBeanOperationInfo Array
 void init(Application app, javax.management.ObjectName objectName, java.lang.String prefix, java.lang.String[] includes, java.lang.String[] excludes)
           
 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.
 void removeAttribute(java.lang.String name)
           
 void reset()
          Operation: reset attributes to their initial values
 void saveAttributes()
          Save Config Attributes
 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.
protected  java.lang.String toOriginal(java.lang.String value)
           
protected  java.lang.String toValidIdentifier(java.lang.String value)
           
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dClassName

protected java.lang.String dClassName

dMBeanInfo

protected javax.management.MBeanInfo dMBeanInfo

objectName

protected javax.management.ObjectName objectName

hashAttrib

protected java.util.Hashtable hashAttrib

initHashAttrib

protected java.util.Hashtable initHashAttrib

config

protected com.lutris.util.Config config

prefix

protected java.lang.String prefix

addedAttributes

protected java.util.Vector addedAttributes

DOT

public static java.lang.String DOT

sequence

protected long sequence

noteTypesChange

protected java.lang.String[] noteTypesChange

noteTypesSave

protected java.lang.String[] noteTypesSave

noteTypesReset

protected java.lang.String[] noteTypesReset

noteTypesAdd

protected java.lang.String[] noteTypesAdd

noteTypesRemove

protected java.lang.String[] noteTypesRemove

application

protected Application application
Constructor Detail

EafConfigMBean

public EafConfigMBean()
A constructor with no arguments is required.


EafConfigMBean

public EafConfigMBean(Application application,
                      javax.management.ObjectName objectName,
                      java.lang.String prefix,
                      java.lang.String[] includes,
                      java.lang.String[] excludes)
Method Detail

toValidIdentifier

protected java.lang.String toValidIdentifier(java.lang.String value)

toOriginal

protected java.lang.String toOriginal(java.lang.String value)

init

public void init(Application app,
                 javax.management.ObjectName objectName,
                 java.lang.String prefix,
                 java.lang.String[] includes,
                 java.lang.String[] excludes)

buildDynamicMBeanInfo

public void buildDynamicMBeanInfo()

getMBeanAttributesInfo

protected javax.management.MBeanAttributeInfo[] getMBeanAttributesInfo()
Method returns MBean's MBeanAttributeInfo Array

Returns:
MBeanAttributeInfo[]

getMBeanOperationsInfo

protected javax.management.MBeanOperationInfo[] getMBeanOperationsInfo()
Method returns MBean's MBeanOperationInfo Array

Returns:
MBeanOperationInfo[]

getMBeanNotificationInfo

protected javax.management.MBeanNotificationInfo[] getMBeanNotificationInfo()
Method returns MBean's MBeanNotificationInfo Array

Returns:
MBeanNotificationInfo[]

getMBeanConstructorInfo

protected javax.management.MBeanConstructorInfo[] getMBeanConstructorInfo()
Method returns MBean's MBeanConstructorInfo Array

Returns:
MBeanConstructorInfo[]

getDescription

protected java.lang.String getDescription()
Method returns MBean's description

Returns:
String

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

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

getAttributes

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

Specified by:
getAttributes in interface javax.management.DynamicMBean

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

saveAttributes

public void saveAttributes()
Save Config Attributes


addAttribute

public void addAttribute(java.lang.String name,
                         java.lang.String value)
Add new attribute to config


reset

public void reset()
           throws javax.management.AttributeNotFoundException
Operation: reset attributes to their initial values

Throws:
javax.management.AttributeNotFoundException

removeAttribute

public void removeAttribute(java.lang.String name)

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

getAppInfo

public java.lang.String getAppInfo()

EAF 7.0 API