EAF 7.4 API

org.enhydra.util
Class AbsConfigMBean

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.enhydra.util.AbsConfigMBean
All Implemented Interfaces:
javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter
Direct Known Subclasses:
EafConfigMBean

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

Core MBean Implementation

Author:
Slobodan Vujasinovic, Tanja Jovanovic

Field Summary
protected  java.util.Vector addedAttributes
           
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  LogChannel logChannel
           
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
AbsConfigMBean()
          A constructor with no arguments is required.
 
Method Summary
 void addAttribute(java.lang.String name, java.lang.String value)
          Add new attribute to config
 void buildDynamicMBeanInfo()
           
 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 abstract  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 abstract  javax.management.MBeanOperationInfo[] getMBeanOperationsInfo()
          Method returns MBean's MBeanOperationInfo Array
 void initConfig(javax.management.ObjectName objectName, java.lang.String prefix, java.lang.String[] includes, java.lang.String[] excludes)
           
abstract  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

logChannel

protected LogChannel logChannel
Constructor Detail

AbsConfigMBean

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

Method Detail

toValidIdentifier

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

toOriginal

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

initConfig

public void initConfig(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 abstract 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 abstract 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 abstract 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

EAF 7.4 API