patterntesting.runtime.jmx
Interface MBeanRegistry

Package class diagram package MBeanRegistry

public interface MBeanRegistry

To avoid confusion with the existing MBeanRegistration interface from javax.management this interface is now called MBeanRegistry (although there are too many negative associations with the word "registry").

Since:
19.02.2009
Version:
$Revision: 1.4 $
Author:
oliver

Method Summary
 String getMBeanName()
          Returns the MBean name under which this class was registered.
 ObjectName getObjectName()
          Returns the MBean name under which this class was registered.
 boolean isRegisteredAsMBean()
          Was the object registered as MBean?
 void registerAsMBean()
          Registers the MBean as "a.b.c:type=Xxx" (where "a.b.c" is the package name and "Xxx" the classname).
 void registerAsMBean(ObjectName name)
          Register the MBean with the given object name.
 void registerAsMBean(String name)
          Register the MBean with the given name.
 void unregisterAsMBean()
          Unregisters the MBean from the MBean server.
 

Method Detail

registerAsMBean

void registerAsMBean()
                     throws JMException
Registers the MBean as "a.b.c:type=Xxx" (where "a.b.c" is the package name and "Xxx" the classname).

Throws:
JMException - the JMX exception

registerAsMBean

void registerAsMBean(String name)
                     throws JMException
Register the MBean with the given name.

Parameters:
name - e.g. "a.b.c:type=Xxx"
Throws:
JMException - the JMX exception

registerAsMBean

void registerAsMBean(ObjectName name)
                     throws JMException
Register the MBean with the given object name.

Parameters:
name - e.g. new ObjectName("a.b.c:type=Xxx");
Throws:
JMException - the JMX exception

unregisterAsMBean

void unregisterAsMBean()
Unregisters the MBean from the MBean server.


isRegisteredAsMBean

boolean isRegisteredAsMBean()
Was the object registered as MBean?

Returns:
true if object was registered.

getMBeanName

String getMBeanName()
Returns the MBean name under which this class was registered.

Returns:
e.g. "a.b.c:type=Xxx"

getObjectName

ObjectName getObjectName()
                         throws MalformedObjectNameException
Returns the MBean name under which this class was registered.

Returns:
e.g. "a.b.c:type=Xxx" as ObjectName
Throws:
MalformedObjectNameException


Copyright © 2002–2014 PatternTesting Team. All rights reserved.