public class MBeanManager extends Object implements MBeanRegistration
This is the main class for MBean manipulation on the agent side. It contains the methods necessary for the creation, registration, and deletion of MBeans as well as the access methods for registered MBeans.
This is the core component of the JMXWrapper infrastructure.
When an MBean is registered or unregistered in the MBean server a
MBeanServerNotification
Notification is emitted.
Implements the MBeanRegistration to support the registration, and
deletion of MBeans.
| Constructor and Description |
|---|
MBeanManager()
Instantiates a new MBean manager.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRegistered(MBean mBean)
Checks whether an MBean, identified by its
Port, the Type
and Application provided, is already registered with the MBean
server. |
boolean |
register(MBean mBean)
Registers the specified object as an MBean with the MBean server in the
specified
Port with the Type and Application
provided. |
boolean |
unRegister(MBean mBean)
Unregisters an MBean from the MBean server.
|
public boolean register(MBean mBean) throws MBeanRegistrationException
MBeanRegistrationPort with the Type and Application
provided. And Adds a NotificationListener to a registered
MBean.
A notification emitted by the MBean will be forwarded by the MBeanServer to the listener. If the source of the notification is a reference to the MBean object, the MBean server will replace it by the MBean's ObjectName. Otherwise the source is unchanged.
If the any one of the details provided happen to be incorrect/null, then nothing will be registered and throws a
register in interface MBeanRegistrationmBean - the mBeanMBeanRegistrationException - the m bean registration exception
MBeanRegistrationException in fact.public boolean unRegister(MBean mBean) throws MBeanRegistrationException
MBeanRegistrationPort, the Type and Application provided. Once
the method has been invoked, the MBean may no longer be accessed by its
object name.
And Removes a listener from this MBean.
unRegister in interface MBeanRegistrationmBean - the m beanMBeanRegistrationException - the m bean registration exception if the provided mBean is a
null or not a valid one.public boolean isRegistered(MBean mBean) throws MBeanRegistrationException
MBeanRegistrationPort, the Type
and Application provided, is already registered with the MBean
server.isRegistered in interface MBeanRegistrationmBean - the m beanMBeanRegistrationException - the m bean registration exceptionCopyright © 2016 utils4j. All Rights Reserved.