Package com.saperion.config
Class SaAbstractJMXProperties
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<java.lang.Object,java.lang.Object>
-
- java.util.Properties
-
- com.saperion.config.SaAbstractJMXProperties
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.util.Map<java.lang.Object,java.lang.Object>
,javax.management.DynamicMBean
- Direct Known Subclasses:
SaJMXBackendProperties
,SaJMXFileProperties
,SaJMXLinkProperties
,SaJMXProperties
,SaJMXStreamProperties
,SaJMXSystemProperties
public abstract class SaAbstractJMXProperties extends java.util.Properties implements javax.management.DynamicMBean
Abstract MBean class for the JMX specification.
A implementation of theSaAbstractJMXProperties
defines the properties of a specific context asDynamicMBean
to be management by a JMX agent.- Author:
- rbo
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CFG_FILE
Config file tag.static java.lang.String
PASSWORD_REPLACEMENT
Replacement for password shown in jconsole.static java.lang.String
PASSWORD_SUFFIX
Suffix of password property names.
-
Constructor Summary
Constructors Constructor Description SaAbstractJMXProperties(java.lang.String configName)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract javax.management.MBeanAttributeInfo[]
constructAttributes()
Construct attributes.protected abstract javax.management.MBeanConstructorInfo[]
constructConstructors()
Construct constructors.protected abstract javax.management.MBeanOperationInfo[]
constructOperations()
Construct Operations.java.lang.Object
getAttribute(java.lang.String attribute)
javax.management.AttributeList
getAttributes(java.lang.String[] attributes)
protected java.io.InputStream
getConfigStream(java.lang.String configuration)
Tries to read the source from different destinations.javax.management.MBeanInfo
getMBeanInfo()
protected abstract java.lang.Object
handleInvoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
Invoke handling.java.lang.Object
invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
protected boolean
isWriteable()
protected void
register(java.lang.String className)
Register bean.void
setAttribute(javax.management.Attribute attribute)
javax.management.AttributeList
setAttributes(javax.management.AttributeList attributes)
protected void
setWriteable(boolean value)
-
Methods inherited from class java.util.Properties
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, toString, values
-
-
-
-
Field Detail
-
PASSWORD_SUFFIX
public static final java.lang.String PASSWORD_SUFFIX
Suffix of password property names.- See Also:
- Constant Field Values
-
PASSWORD_REPLACEMENT
public static final java.lang.String PASSWORD_REPLACEMENT
Replacement for password shown in jconsole.- See Also:
- Constant Field Values
-
CFG_FILE
public static final java.lang.String CFG_FILE
Config file tag.- See Also:
- Constant Field Values
-
-
Method Detail
-
isWriteable
protected boolean isWriteable()
- Returns:
- is writable
-
setWriteable
protected void setWriteable(boolean value)
- Parameters:
value
- Writable
-
getConfigStream
protected java.io.InputStream getConfigStream(java.lang.String configuration) throws java.io.IOException
Tries to read the source from different destinations.- Parameters:
configuration
- The source file name- Returns:
- The input stream of this source
- Throws:
java.io.IOException
- in case of configuration file does not exist.
-
register
protected void register(java.lang.String className)
Register bean.- Parameters:
className
- Class name
-
constructAttributes
protected abstract javax.management.MBeanAttributeInfo[] constructAttributes()
Construct attributes.- Returns:
- Attribute infos
-
constructOperations
protected abstract javax.management.MBeanOperationInfo[] constructOperations()
Construct Operations.- Returns:
- Operation infos
-
constructConstructors
protected abstract javax.management.MBeanConstructorInfo[] constructConstructors()
Construct constructors.- Returns:
- Constructor infos
-
handleInvoke
protected abstract java.lang.Object handleInvoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.ReflectionException
Invoke handling.- Parameters:
actionName
- Action nameparams
- Parameterssignature
- Signatures- Returns:
- Handle object
- Throws:
javax.management.MBeanException
- MBeanExceptionjavax.management.ReflectionException
- ReflectionException
-
getAttribute
public java.lang.Object getAttribute(java.lang.String attribute) throws javax.management.AttributeNotFoundException, javax.management.MBeanException, javax.management.ReflectionException
- Specified by:
getAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
- See Also:
DynamicMBean.getAttribute(java.lang.String)
-
getAttributes
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
- Specified by:
getAttributes
in interfacejavax.management.DynamicMBean
- See Also:
DynamicMBean.getAttributes(java.lang.String[])
-
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfo
in interfacejavax.management.DynamicMBean
- See Also:
DynamicMBean.getMBeanInfo()
-
invoke
public java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature) throws javax.management.MBeanException, javax.management.ReflectionException
- Specified by:
invoke
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.MBeanException
javax.management.ReflectionException
- See Also:
DynamicMBean.invoke(java.lang.String, java.lang.Object[], java.lang.String[])
-
setAttribute
public void setAttribute(javax.management.Attribute attribute) throws javax.management.AttributeNotFoundException, javax.management.InvalidAttributeValueException, javax.management.MBeanException, javax.management.ReflectionException
- Specified by:
setAttribute
in interfacejavax.management.DynamicMBean
- Throws:
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException
- See Also:
DynamicMBean.setAttribute(javax.management.Attribute)
-
setAttributes
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
- Specified by:
setAttributes
in interfacejavax.management.DynamicMBean
- See Also:
DynamicMBean.setAttributes(javax.management.AttributeList)
-
-