public abstract class SaAbstractJMXProperties extends Properties implements DynamicMBean
SaAbstractJMXProperties
defines the properties of a specific context as DynamicMBean
to be management by a JMX agent.Modifier and Type | Field and Description |
---|---|
static String |
CFG_FILE
Config file tag.
|
static String |
PASSWORD_REPLACEMENT
Replacement for password shown in jconsole.
|
static String |
PASSWORD_SUFFIX
Suffix of password property names.
|
defaults
Constructor and Description |
---|
SaAbstractJMXProperties(String configName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected abstract MBeanAttributeInfo[] |
constructAttributes()
Construct attributes.
|
protected abstract MBeanConstructorInfo[] |
constructConstructors()
Construct constructors.
|
protected abstract MBeanOperationInfo[] |
constructOperations()
Construct Operations.
|
Object |
getAttribute(String attribute) |
AttributeList |
getAttributes(String[] attributes) |
protected InputStream |
getConfigStream(String configuration)
Tries to read the source from different destinations.
|
MBeanInfo |
getMBeanInfo() |
protected abstract Object |
handleInvoke(String actionName,
Object[] params,
String[] signature)
Invoke handling.
|
Object |
invoke(String actionName,
Object[] params,
String[] signature) |
protected boolean |
isWriteable() |
protected void |
register(String className)
Register bean.
|
void |
setAttribute(Attribute attribute) |
AttributeList |
setAttributes(AttributeList attributes) |
protected void |
setWriteable(boolean value) |
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames
clear, clone, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keys, keySet, merge, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, size, toString, values
public static final String PASSWORD_SUFFIX
public static final String PASSWORD_REPLACEMENT
public static final String CFG_FILE
public SaAbstractJMXProperties(String configName)
configName
- Nameprotected boolean isWriteable()
protected void setWriteable(boolean value)
value
- Writableprotected InputStream getConfigStream(String configuration) throws IOException
configuration
- The source file nameIOException
- in case of configuration file does not exist.protected void register(String className)
className
- Class nameprotected abstract MBeanAttributeInfo[] constructAttributes()
protected abstract MBeanOperationInfo[] constructOperations()
protected abstract MBeanConstructorInfo[] constructConstructors()
protected abstract Object handleInvoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
actionName
- Action nameparams
- Parameterssignature
- SignaturesMBeanException
- MBeanExceptionReflectionException
- ReflectionExceptionpublic Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
getAttribute
in interface DynamicMBean
AttributeNotFoundException
MBeanException
ReflectionException
DynamicMBean.getAttribute(java.lang.String)
public AttributeList getAttributes(String[] attributes)
getAttributes
in interface DynamicMBean
DynamicMBean.getAttributes(java.lang.String[])
public MBeanInfo getMBeanInfo()
getMBeanInfo
in interface DynamicMBean
DynamicMBean.getMBeanInfo()
public Object invoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
invoke
in interface DynamicMBean
MBeanException
ReflectionException
DynamicMBean.invoke(java.lang.String,
java.lang.Object[], java.lang.String[])
public void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
setAttribute
in interface DynamicMBean
AttributeNotFoundException
InvalidAttributeValueException
MBeanException
ReflectionException
DynamicMBean.setAttribute(javax.management.Attribute)
public AttributeList setAttributes(AttributeList attributes)
setAttributes
in interface DynamicMBean
DynamicMBean.setAttributes(javax.management.AttributeList)
Copyright © 2020 Hyland Software Germany GmbH. All rights reserved.