List of utility methods to do MBean
void | registerMBean(Object bean, MBeanServer mBeanServer, ObjectName objectName) register M Bean if (!mBeanServer.isRegistered(objectName)) { mBeanServer.registerMBean(bean, objectName); } else { unregisterMBean(mBeanServer, objectName); mBeanServer.registerMBean(bean, objectName); |
void | removeTimerNotification(ObjectName timer, Integer id, MBeanServer server) remove Timer Notification server.invoke(timer, REMOVE_NOTIFICATION_OPERATION_NAME, new Object[] { id },
REMOVE_NOTIFICATION_SIGNATURE);
|
ClassLoader | resolveServerClassLoader(Map env, MBeanServer mbs) Get the Connector Server default class loader. if (env == null) return Thread.currentThread().getContextClassLoader(); Object loader = env.get(DEFAULT_CLASS_LOADER); Object name = env.get(DEFAULT_CLASS_LOADER_NAME); if (loader != null && name != null) { final String msg = "Only one of " + DEFAULT_CLASS_LOADER + " or " + DEFAULT_CLASS_LOADER_NAME + " should be specified."; throw new IllegalArgumentException(msg); ... |
MBeanServer | setQueryExpServer(QueryExp query, MBeanServer toSet) Set the mbean server on the QueryExp and try and pass back any previously set one MBeanServer result = QueryEval.getMBeanServer();
query.setMBeanServer(toSet);
return result;
|
String | toString(MBeanParameterInfo[] pinfo) to String StringBuffer sb = new StringBuffer(); for (int i = 0; i < pinfo.length; i++) { if (sb.length() != 0) { sb.append(", "); sb.append(pinfo[i].getType()); sb.insert(0, '('); ... |
String | unregisterMBean(MBeanServer mbs, ObjectName name) unregister M Bean if (name == null) { return null; try { mbs.unregisterMBean(name); return null; } catch (InstanceNotFoundException | MBeanRegistrationException ex) { return ex.getMessage(); ... |