Package org.apache.uima.internal.util
Class JmxMBeanAgent
- java.lang.Object
-
- org.apache.uima.internal.util.JmxMBeanAgent
-
public class JmxMBeanAgent extends java.lang.ObjectUtility class for registering MBeans with a JMX MBeanServer. This allows AnalysisEngine performance stats to be monitored through JMX, for example.
-
-
Field Summary
Fields Modifier and Type Field Description private static booleanjmxAvailableSet to true if we can find the required JMX classes and methodsprivate static java.lang.StringLOG_RESOURCE_BUNDLEresource bundle for log messagesprivate static javax.management.MBeanServerplatformMBeanServerThe platform MBean server This is available since Java 1.5
-
Constructor Summary
Constructors Constructor Description JmxMBeanAgent()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidregisterMBean(ManagementObject aMBean, java.lang.Object aMBeanServerO)Register an MBean with the MBeanServer.static voidunregisterMBean(ManagementObject aMBean, java.lang.Object aMBeanServerO)Unregister an MBean from the MBeanServer.
-
-
-
Field Detail
-
jmxAvailable
private static boolean jmxAvailable
Set to true if we can find the required JMX classes and methods
-
platformMBeanServer
private static javax.management.MBeanServer platformMBeanServer
The platform MBean server This is available since Java 1.5
-
LOG_RESOURCE_BUNDLE
private static final java.lang.String LOG_RESOURCE_BUNDLE
resource bundle for log messages- See Also:
- Constant Field Values
-
-
Method Detail
-
registerMBean
public static void registerMBean(ManagementObject aMBean, java.lang.Object aMBeanServerO)
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
public static void unregisterMBean(ManagementObject aMBean, java.lang.Object aMBeanServerO)
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.
-
-