| java.lang.Object com.sun.jbi.util.jmx.MBeanUtils
MBeanUtils | public class MBeanUtils (Code) | | Helper class for frequently used MBean housekeeping. This is a static
class that must have a reference to the MBean server currently being used.
Early in the initialization of the JBI framework, the MBean server reference
is set by the framework, before any other JBI services are initialized. This
ensures that the MBean server reference will always be available. While not
an ideal design, in the context of the JBI runtime, this is a workable
solution and prevents every caller from having to have a reference to the
MBean server.
author: Sun Microsystems, Inc. |
Method Summary | |
public static void | init(MBeanServer server) Initialize the static data. | public static void | registerStandardMBean(Class interfaceClass, Object instance, ObjectName mbeanName, boolean replace) Create and register a standard MBean with the main MBean Server.
Parameters: interfaceClass - the MBean interface implemented by the instance. Parameters: instance - the MBean implementation instance. Parameters: mbeanName - the JMX ObjectName for the MBean. Parameters: replace - indicates whether an existing registration should bereplaced or cause an error. | public static void | unregisterMBean(ObjectName mbeanName) Unregister an MBean from the MBean server. |
init | public static void init(MBeanServer server)(Code) | | Initialize the static data. This method is called by the framework
during initialization so that all other code can use the other methods
in the class at any time. This is also used by the ProxyBinding as it
has its own classloader so it needs to initialize the same static data.
Parameters: server - The MBean Server reference to be used. |
registerStandardMBean | public static void registerStandardMBean(Class interfaceClass, Object instance, ObjectName mbeanName, boolean replace) throws javax.jbi.JBIException(Code) | | Create and register a standard MBean with the main MBean Server.
Parameters: interfaceClass - the MBean interface implemented by the instance. Parameters: instance - the MBean implementation instance. Parameters: mbeanName - the JMX ObjectName for the MBean. Parameters: replace - indicates whether an existing registration should bereplaced or cause an error. If true, an existing registration should bereplaced; if false, an existing registration should cause an error. throws: javax.jbi.JBIException - If the MBean creation or registrationfails. |
|
|