Package com.atlassian.plugin.jmx
Class JmxUtil
java.lang.Object
com.atlassian.plugin.jmx.JmxUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectNameobjectName(AtomicInteger counter, String type) Obtain a JMX ObjectName for a new instance of a given type.static ObjectInstanceregister(Object object, ObjectName objectName) Register a JMX MBean against a given ObjectName.static booleanunregister(ObjectName objectName) Unregister the JMX MBean with a given ObjectName.
-
Constructor Details
-
JmxUtil
public JmxUtil()
-
-
Method Details
-
objectName
Obtain a JMX ObjectName for a new instance of a given type.- Parameters:
counter- a counter used to ensure a unique instance id amongst instances with given type.type- the friendly type name for the instance.- Returns:
- a JMX ObjectName for the instance, or null if creation fails.
-
register
Register a JMX MBean against a given ObjectName.This is simply an error logging wrapper around
MBeanServer.registerMBean(java.lang.Object, javax.management.ObjectName).- Parameters:
object- the MBean implementation to register.objectName- the ObjectName to register against.- Returns:
- the ObjectInstance encapsulating the registration, or null if registration failed.
-
unregister
Unregister the JMX MBean with a given ObjectName.This is simply an error logging wrapper around
MBeanServer.unregisterMBean(javax.management.ObjectName).- Parameters:
objectName- the ObjectName of the MBean to unregister.- Returns:
- true if unregister succeeded, or false if unregister failed.
-