@Component(value="ui_JmxControl") public class JmxControlImpl extends java.lang.Object implements JmxControl
Modifier and Type | Class and Description |
---|---|
protected static class |
JmxControlImpl.AttributeComparator
Sorts attributes alphabetically by name
|
protected static class |
JmxControlImpl.DomainComparator
Sorts domains alphabetically by name
|
protected static class |
JmxControlImpl.MBeanComparator
Sorts mbeans alphabetically by name
|
protected static class |
JmxControlImpl.OperationComparator
Sorts operations alphabetically by name
|
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
FIELD_ROLE
Constant identifier for the role field in a JMX
Descriptor . |
static java.lang.String |
JMX_PORT_SYSTEM_PROPERTY |
protected io.jmix.core.Metadata |
metadata |
static java.lang.String |
RMI_SERVER_HOSTNAME_SYSTEM_PROPERTY |
protected static java.lang.String |
ROLE_GETTER
Constant identifier for the getter role field value in a JMX
Descriptor . |
protected static java.lang.String |
ROLE_SETTER
Constant identifier for the setter role field value in a JMX
Descriptor . |
Constructor and Description |
---|
JmxControlImpl() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
cleanType(java.lang.String type) |
protected ManagedBeanAttribute |
createAttribute(javax.management.MBeanServerConnection connection,
javax.management.ObjectName name,
javax.management.MBeanAttributeInfo attribute,
ManagedBeanInfo mbinfo) |
protected ManagedBeanDomain |
createDomain(java.lang.String d) |
protected ManagedBeanInfo |
createManagedBeanInfo(javax.management.ObjectName name,
javax.management.MBeanInfo info) |
protected ManagedBeanOperation |
createOperation(ManagedBeanInfo mbean,
javax.management.MBeanOperationInfo operation) |
protected ManagedBeanOperationParameter |
createOperationParameter(ManagedBeanOperation o,
int index,
javax.management.MBeanParameterInfo pinfo) |
protected boolean |
equalAttributes(java.util.List<ManagedBeanOperationParameter> args,
java.lang.String[] argTypes) |
java.util.List<ManagedBeanDomain> |
getDomains()
Loads list of managed bean domains
|
ManagedBeanInfo |
getManagedBean(java.lang.String beanObjectName)
Loads the managed bean by its ObjectName
|
java.util.List<ManagedBeanInfo> |
getManagedBeans()
Loads the list of managed bean infos
|
ManagedBeanOperation |
getOperation(ManagedBeanInfo bean,
java.lang.String operationName,
java.lang.String[] argTypes)
Searches for the bean operation by its name and argument types.
|
java.lang.Object |
invokeOperation(ManagedBeanOperation operation,
java.lang.Object[] parameterValues)
Invokes method of managed bean
|
protected boolean |
isGetterOrSetter(javax.management.MBeanOperationInfo operation) |
ManagedBeanAttribute |
loadAttribute(ManagedBeanInfo mbinfo,
java.lang.String attributeName)
Loads attribute by its name.
|
void |
loadAttributes(ManagedBeanInfo mbinfo)
Loads attributes for managed bean descriptor
|
void |
loadAttributeValue(ManagedBeanAttribute attribute)
Loads attribute value for managed bean attribute
|
protected void |
loadOperations(ManagedBeanInfo mbean,
javax.management.MBeanInfo info) |
void |
saveAttributeValue(ManagedBeanAttribute attribute)
Saves attribute value to JMX node
|
protected void |
setSerializableValue(ManagedBeanAttribute mba,
java.lang.Object value) |
protected static <T> T |
withConnection(JmxAction<T> action) |
public static final java.lang.String JMX_PORT_SYSTEM_PROPERTY
public static final java.lang.String RMI_SERVER_HOSTNAME_SYSTEM_PROPERTY
@Autowired protected io.jmix.core.Metadata metadata
protected static final java.lang.String FIELD_ROLE
Descriptor
.protected static final java.lang.String ROLE_GETTER
Descriptor
.protected static final java.lang.String ROLE_SETTER
Descriptor
.public java.util.List<ManagedBeanInfo> getManagedBeans()
JmxControl
getManagedBeans
in interface JmxControl
public ManagedBeanInfo getManagedBean(java.lang.String beanObjectName)
JmxControl
getManagedBean
in interface JmxControl
beanObjectName
- exact ObjectName of the beanprotected ManagedBeanInfo createManagedBeanInfo(javax.management.ObjectName name, javax.management.MBeanInfo info)
public void loadAttributes(ManagedBeanInfo mbinfo)
JmxControl
loadAttributes
in interface JmxControl
mbinfo
- managed bean descriptorpublic ManagedBeanAttribute loadAttribute(ManagedBeanInfo mbinfo, java.lang.String attributeName)
JmxControl
loadAttribute
in interface JmxControl
mbinfo
- managed bean descriptorprotected ManagedBeanAttribute createAttribute(javax.management.MBeanServerConnection connection, javax.management.ObjectName name, javax.management.MBeanAttributeInfo attribute, ManagedBeanInfo mbinfo)
public void loadAttributeValue(ManagedBeanAttribute attribute)
JmxControl
loadAttributeValue
in interface JmxControl
attribute
- attribute descriptorpublic ManagedBeanOperation getOperation(ManagedBeanInfo bean, java.lang.String operationName, @Nullable java.lang.String[] argTypes)
JmxControl
getOperation
in interface JmxControl
bean
- managed bean descriptoroperationName
- operation exact nameargTypes
- operation argument typespublic void saveAttributeValue(ManagedBeanAttribute attribute)
JmxControl
saveAttributeValue
in interface JmxControl
attribute
- attribute descriptorpublic java.lang.Object invokeOperation(ManagedBeanOperation operation, java.lang.Object[] parameterValues)
JmxControl
invokeOperation
in interface JmxControl
operation
- operation descriptorparameterValues
- array with parameter valuespublic java.util.List<ManagedBeanDomain> getDomains()
JmxControl
getDomains
in interface JmxControl
protected boolean equalAttributes(java.util.List<ManagedBeanOperationParameter> args, java.lang.String[] argTypes)
protected void loadOperations(ManagedBeanInfo mbean, javax.management.MBeanInfo info)
protected boolean isGetterOrSetter(javax.management.MBeanOperationInfo operation)
protected ManagedBeanOperationParameter createOperationParameter(ManagedBeanOperation o, int index, javax.management.MBeanParameterInfo pinfo)
protected ManagedBeanOperation createOperation(ManagedBeanInfo mbean, javax.management.MBeanOperationInfo operation)
protected ManagedBeanDomain createDomain(java.lang.String d)
protected java.lang.String cleanType(java.lang.String type)
protected void setSerializableValue(ManagedBeanAttribute mba, java.lang.Object value)
protected static <T> T withConnection(JmxAction<T> action)