|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.granite.jmx.MBeanServerLocator
public class MBeanServerLocator
Utility class for MBean server lookup (with a specific support for the JBoss JMX console) and MBeans registration.
| Method Summary | |
|---|---|
static MBeanServerLocator |
getInstance()
Returns a singleton instance of the MBeanServerLocator class. |
MBeanServer |
getMBeanServer()
Returns the MBeanServer wrapped by this MBeanServerLocator instance. |
boolean |
isRegistered(ObjectName name)
Returns true if a MBean is registered under the supplied name. |
void |
register(Object mbean,
ObjectName name)
Register the mbean object with the supplied name. |
void |
register(Object mbean,
ObjectName name,
boolean replace)
Register the mbean object with the supplied name. |
void |
unregister(ObjectName name)
Unregister any mbean registered under the supplied name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MBeanServerLocator getInstance()
MBeanServer.
public MBeanServer getMBeanServer()
MBeanServer wrapped by this MBeanServerLocator instance.
MBeanServer.
public void register(Object mbean,
ObjectName name)
throws MBeanRegistrationException,
InstanceNotFoundException,
InstanceAlreadyExistsException,
NotCompliantMBeanException
register(Object, ObjectName, boolean) with its
last parameter set to false.
mbean - the mbean to register.name - the name used for registration.
MBeanRegistrationException - rethrown from the wrapped MBeanServer
InstanceNotFoundException - rethrown from the wrapped MBeanServer
InstanceAlreadyExistsException - rethrown from the wrapped MBeanServer
NotCompliantMBeanException - rethrown from the wrapped MBeanServer
public void register(Object mbean,
ObjectName name,
boolean replace)
throws MBeanRegistrationException,
InstanceNotFoundException,
InstanceAlreadyExistsException,
NotCompliantMBeanException
mbean - the mbean to register.name - the name used for registration.replace - if true, a mbean registered under the same name will be first
unregistered.
MBeanRegistrationException - rethrown from the wrapped MBeanServer
InstanceNotFoundException - rethrown from the wrapped MBeanServer
InstanceAlreadyExistsException - rethrown from the wrapped MBeanServer
NotCompliantMBeanException - rethrown from the wrapped MBeanServerpublic boolean isRegistered(ObjectName name)
name - the name to test for registration.
public void unregister(ObjectName name)
throws InstanceNotFoundException,
MBeanRegistrationException
name - the name of mbean to unregister.
InstanceNotFoundException - rethrown from the wrapped MBeanServer
MBeanRegistrationException - rethrown from the wrapped MBeanServer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||