Package com.saperion.config
Class SaAbstractJMXProperties
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<Object,
,Object> DynamicMBean
- Direct Known Subclasses:
SaJMXBackendProperties
,SaJMXFileProperties
,SaJMXLinkProperties
,SaJMXProperties
,SaJMXStreamProperties
,SaJMXSystemProperties
Abstract MBean class for the JMX specification.
A implementation of the
A implementation of the
SaAbstractJMXProperties
defines the properties of a specific context as DynamicMBean
to be management by a JMX agent.- Author:
- rbo
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Config file tag.static final String
Replacement for password shown in jconsole.static final String
Suffix of password property names.Fields inherited from class java.util.Properties
defaults
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract MBeanAttributeInfo[]
Construct attributes.protected abstract MBeanConstructorInfo[]
Construct constructors.protected abstract MBeanOperationInfo[]
Construct Operations.getAttribute
(String attribute) getAttributes
(String[] attributes) protected InputStream
getConfigStream
(String configuration) Tries to read the source from different destinations.protected abstract Object
handleInvoke
(String actionName, Object[] params, String[] signature) Invoke handling.protected boolean
protected void
Register bean.void
setAttribute
(Attribute attribute) setAttributes
(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 Details
-
PASSWORD_SUFFIX
Suffix of password property names.- See Also:
-
PASSWORD_REPLACEMENT
Replacement for password shown in jconsole.- See Also:
-
CFG_FILE
Config file tag.- See Also:
-
-
Constructor Details
-
SaAbstractJMXProperties
Constructor.- Parameters:
configName
- Name
-
-
Method Details
-
isWriteable
protected boolean isWriteable()- Returns:
- is writable
-
setWriteable
protected void setWriteable(boolean value) - Parameters:
value
- Writable
-
getConfigStream
Tries to read the source from different destinations.- Parameters:
configuration
- The source file name- Returns:
- The input stream of this source
- Throws:
IOException
- in case of configuration file does not exist.
-
register
Register bean.- Parameters:
className
- Class name
-
constructAttributes
Construct attributes.- Returns:
- Attribute infos
-
constructOperations
Construct Operations.- Returns:
- Operation infos
-
constructConstructors
Construct constructors.- Returns:
- Constructor infos
-
handleInvoke
protected abstract Object handleInvoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException Invoke handling.- Parameters:
actionName
- Action nameparams
- Parameterssignature
- Signatures- Returns:
- Handle object
- Throws:
MBeanException
- MBeanExceptionReflectionException
- ReflectionException
-
getAttribute
public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException - Specified by:
getAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
MBeanException
ReflectionException
- See Also:
-
getAttributes
- Specified by:
getAttributes
in interfaceDynamicMBean
- See Also:
-
getMBeanInfo
- Specified by:
getMBeanInfo
in interfaceDynamicMBean
- See Also:
-
invoke
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException - Specified by:
invoke
in interfaceDynamicMBean
- Throws:
MBeanException
ReflectionException
- See Also:
-
setAttribute
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException - Specified by:
setAttribute
in interfaceDynamicMBean
- Throws:
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
- See Also:
-
setAttributes
- Specified by:
setAttributes
in interfaceDynamicMBean
- See Also:
-