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.DynamicMBeanAbstract MBean class for the JMX specification.
A implementation of theSaAbstractJMXPropertiesdefines the properties of a specific context asDynamicMBeanto be management by a JMX agent.- Author:
- rbo
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCFG_FILEConfig file tag.static java.lang.StringPASSWORD_REPLACEMENTReplacement for password shown in jconsole.static java.lang.StringPASSWORD_SUFFIXSuffix 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.ObjectgetAttribute(java.lang.String attribute)javax.management.AttributeListgetAttributes(java.lang.String[] attributes)protected java.io.InputStreamgetConfigStream(java.lang.String configuration)Tries to read the source from different destinations.javax.management.MBeanInfogetMBeanInfo()protected abstract java.lang.ObjecthandleInvoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)Invoke handling.java.lang.Objectinvoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)protected booleanisWriteable()protected voidregister(java.lang.String className)Register bean.voidsetAttribute(javax.management.Attribute attribute)javax.management.AttributeListsetAttributes(javax.management.AttributeList attributes)protected voidsetWriteable(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.IOExceptionTries 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.ReflectionExceptionInvoke 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:
getAttributein interfacejavax.management.DynamicMBean- Throws:
javax.management.AttributeNotFoundExceptionjavax.management.MBeanExceptionjavax.management.ReflectionException- See Also:
DynamicMBean.getAttribute(java.lang.String)
-
getAttributes
public javax.management.AttributeList getAttributes(java.lang.String[] attributes)
- Specified by:
getAttributesin interfacejavax.management.DynamicMBean- See Also:
DynamicMBean.getAttributes(java.lang.String[])
-
getMBeanInfo
public javax.management.MBeanInfo getMBeanInfo()
- Specified by:
getMBeanInfoin 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:
invokein interfacejavax.management.DynamicMBean- Throws:
javax.management.MBeanExceptionjavax.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:
setAttributein interfacejavax.management.DynamicMBean- Throws:
javax.management.AttributeNotFoundExceptionjavax.management.InvalidAttributeValueExceptionjavax.management.MBeanExceptionjavax.management.ReflectionException- See Also:
DynamicMBean.setAttribute(javax.management.Attribute)
-
setAttributes
public javax.management.AttributeList setAttributes(javax.management.AttributeList attributes)
- Specified by:
setAttributesin interfacejavax.management.DynamicMBean- See Also:
DynamicMBean.setAttributes(javax.management.AttributeList)
-
-