Package io.jmix.ui.app.jmxconsole.impl
Class JmxControlImpl
java.lang.Object
io.jmix.ui.app.jmxconsole.impl.JmxControlImpl
- All Implemented Interfaces:
JmxControl
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Sorts attributes alphabetically by nameprotected static class
Sorts domains alphabetically by nameprotected static class
Sorts mbeans alphabetically by nameprotected static class
Sorts operations alphabetically by name -
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
Constant identifier for the role field in a JMXDescriptor
.static final String
protected Metadata
static final String
protected static final String
Constant identifier for the getter role field value in a JMXDescriptor
.protected static final String
Constant identifier for the setter role field value in a JMXDescriptor
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected ManagedBeanAttribute
createAttribute
(MBeanServerConnection connection, ObjectName name, MBeanAttributeInfo attribute, ManagedBeanInfo mbinfo) protected ManagedBeanDomain
protected ManagedBeanInfo
createManagedBeanInfo
(ObjectName name, MBeanInfo info) protected ManagedBeanOperation
createOperation
(ManagedBeanInfo mbean, MBeanOperationInfo operation) protected ManagedBeanOperationParameter
createOperationParameter
(ManagedBeanOperation o, int index, MBeanParameterInfo pinfo) protected boolean
equalAttributes
(List<ManagedBeanOperationParameter> args, String[] argTypes) Loads list of managed bean domainsgetManagedBean
(String beanObjectName) Loads the managed bean by its ObjectNameLoads the list of managed bean infosgetOperation
(ManagedBeanInfo bean, String operationName, String[] argTypes) Searches for the bean operation by its name and argument types.invokeOperation
(ManagedBeanOperation operation, Object[] parameterValues) Invokes method of managed beanprotected boolean
isGetterOrSetter
(MBeanOperationInfo operation) loadAttribute
(ManagedBeanInfo mbinfo, String attributeName) Loads attribute by its name.void
loadAttributes
(ManagedBeanInfo mbinfo) Loads attributes for managed bean descriptorvoid
loadAttributeValue
(ManagedBeanAttribute attribute) Loads attribute value for managed bean attributeprotected void
loadOperations
(ManagedBeanInfo mbean, MBeanInfo info) void
saveAttributeValue
(ManagedBeanAttribute attribute) Saves attribute value to JMX nodeprotected void
setSerializableValue
(ManagedBeanAttribute mba, Object value) protected static <T> T
withConnection
(JmxAction<T> action)
-
Field Details
-
JMX_PORT_SYSTEM_PROPERTY
- See Also:
-
RMI_SERVER_HOSTNAME_SYSTEM_PROPERTY
- See Also:
-
metadata
-
FIELD_ROLE
Constant identifier for the role field in a JMXDescriptor
.- See Also:
-
ROLE_GETTER
Constant identifier for the getter role field value in a JMXDescriptor
.- See Also:
-
ROLE_SETTER
Constant identifier for the setter role field value in a JMXDescriptor
.- See Also:
-
-
Constructor Details
-
JmxControlImpl
public JmxControlImpl()
-
-
Method Details
-
getManagedBeans
Description copied from interface:JmxControl
Loads the list of managed bean infos- Specified by:
getManagedBeans
in interfaceJmxControl
- Returns:
- the list with managed beans
-
getManagedBean
Description copied from interface:JmxControl
Loads the managed bean by its ObjectName- Specified by:
getManagedBean
in interfaceJmxControl
- Parameters:
beanObjectName
- exact ObjectName of the bean- Returns:
- found managed bean, null if no bean found
-
createManagedBeanInfo
-
loadAttributes
Description copied from interface:JmxControl
Loads attributes for managed bean descriptor- Specified by:
loadAttributes
in interfaceJmxControl
- Parameters:
mbinfo
- managed bean descriptor
-
loadAttribute
Description copied from interface:JmxControl
Loads attribute by its name. Note that the reference from ManagedBeanInfo to loaded ManagedBeanAttribute is not set.- Specified by:
loadAttribute
in interfaceJmxControl
- Parameters:
mbinfo
- managed bean descriptor- Returns:
- loaded attribute, null if no attribute found.
-
createAttribute
protected ManagedBeanAttribute createAttribute(MBeanServerConnection connection, ObjectName name, MBeanAttributeInfo attribute, ManagedBeanInfo mbinfo) -
loadAttributeValue
Description copied from interface:JmxControl
Loads attribute value for managed bean attribute- Specified by:
loadAttributeValue
in interfaceJmxControl
- Parameters:
attribute
- attribute descriptor
-
getOperation
public ManagedBeanOperation getOperation(ManagedBeanInfo bean, String operationName, @Nullable String[] argTypes) Description copied from interface:JmxControl
Searches for the bean operation by its name and argument types.- Specified by:
getOperation
in interfaceJmxControl
- Parameters:
bean
- managed bean descriptoroperationName
- operation exact nameargTypes
- operation argument types- Returns:
- Found operation descriptor, null if not found
-
saveAttributeValue
Description copied from interface:JmxControl
Saves attribute value to JMX node- Specified by:
saveAttributeValue
in interfaceJmxControl
- Parameters:
attribute
- attribute descriptor
-
invokeOperation
Description copied from interface:JmxControl
Invokes method of managed bean- Specified by:
invokeOperation
in interfaceJmxControl
- Parameters:
operation
- operation descriptorparameterValues
- array with parameter values- Returns:
- invocation result
-
getDomains
Description copied from interface:JmxControl
Loads list of managed bean domains- Specified by:
getDomains
in interfaceJmxControl
- Returns:
- the list of managed bean domains
-
equalAttributes
-
loadOperations
-
isGetterOrSetter
-
createOperationParameter
protected ManagedBeanOperationParameter createOperationParameter(ManagedBeanOperation o, int index, MBeanParameterInfo pinfo) -
createOperation
-
createDomain
-
cleanType
-
setSerializableValue
-
withConnection
-