|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.palantir.opensource.sysmon.util.JMXUtils
public final class JMXUtils
A small collection of utility methods to simplify bean registration and removal.
MBeanServer| Method Summary | |
|---|---|
static void |
prettyPrintMbean(ObjectName mbean)
Prints out all the attributes for the passed JMX MBean |
static void |
registerMBean(Object mbean,
String objectName)
Simple method to register a bean with the server. |
static void |
unregisterMBeanCatchAndLogExceptions(String objectName)
Unconditionally attempts to unregister the specified MX Bean. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void registerMBean(Object mbean,
String objectName)
throws JMException
ManagementFactory.getPlatformMBeanServer().
This method unconditionally registers the passed bean by unregistering any
existing bean at the specified objectName.
mbean - The MBean to be mounted on the server.objectName - the path to mount the MBean at.
JMException - upon error with JMX server operationspublic static void unregisterMBeanCatchAndLogExceptions(String objectName)
Level.ERROR via log4j.
objectName - String path to the bean to be removed.
public static final void prettyPrintMbean(ObjectName mbean)
throws JMException
mbean - The bean whose attributes will be pretty printed.
JMException - on error with JMX operations
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||