Package org.apache.uima.internal.util
Class JmxMBeanAgent
java.lang.Object
org.apache.uima.internal.util.JmxMBeanAgent
Utility class for registering MBeans with a JMX MBeanServer. This allows AnalysisEngine
performance stats to be monitored through JMX, for example.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static boolean
Set to true if we can find the required JMX classes and methodsprivate static final String
resource bundle for log messagesprivate static MBeanServer
The platform MBean server This is available since Java 1.5 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
registerMBean
(ManagementObject aMBean, Object aMBeanServerO) Register an MBean with the MBeanServer.static void
unregisterMBean
(ManagementObject aMBean, Object aMBeanServerO) Unregister an MBean from the MBeanServer.
-
Field Details
-
jmxAvailable
private static boolean jmxAvailableSet to true if we can find the required JMX classes and methods -
platformMBeanServer
The platform MBean server This is available since Java 1.5 -
LOG_RESOURCE_BUNDLE
resource bundle for log messages- See Also:
-
-
Constructor Details
-
JmxMBeanAgent
public JmxMBeanAgent()
-
-
Method Details
-
registerMBean
Register an MBean with the MBeanServer.- Parameters:
aMBean
- the MBean to registeraMBeanServerO
- server to register with. If null, the platform MBeanServer will be used if we are running under Java 1.5. Earlier versions of Java did not have a platform MBeanServer; in that case, this method will do nothing.
-
unregisterMBean
Unregister an MBean from the MBeanServer.- Parameters:
aMBean
- the MBean to registeraMBeanServerO
- server to unregister from. If null, the platform MBeanServer will be used if we are running under Java 1.5. Earlier versions of Java did not have a platform MBeanServer; in that case, this method will do nothing.
-