Can be implemented by an MBean in order to carry out operations before and after being registered or unregistered from the MBean Server. An MBean can also implement this interface in order to get a reference to the MBean Server and/or its name within that MBean Server.
Modifier and Type | Method and Description |
---|---|
public void | postDeregister()
Allows the MBean to perform any operations needed after having been unregistered in the MBean server. |
public void | postRegister(Boolean
Indicates whether or not the MBean has
been successfully registered in the MBean server. The value
false means that the registration phase has failed. registrationDone)Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. |
public void | preDeregister()
Allows the MBean to perform any operations it needs before being unregistered by the MBean server. |
public ObjectName | Returns: The name under which the MBean is to be registered. This value must not be null. If thename
parameter is not null, it will usually but not necessarily be
the returned value.The MBean Server in which the MBean will be registered. server, ObjectName The object name of the MBean. This name is null if
the name parameter to one of the name)createMBean or
registerMBean methods in the MBeanServer
interface is null. In that case, this method must return a
non-null ObjectName for the new MBean.Allows the MBean to perform any operations it needs before being registered in the MBean Server. |
postDeregister | back to summary |
---|---|
public void postDeregister() Allows the MBean to perform any operations needed after having been unregistered in the MBean server. If the implementation of this method throws a This might be confusing for the code calling
|
postRegister | back to summary |
---|---|
public void postRegister(Boolean registrationDone) Allows the MBean to perform any operations needed after having been registered in the MBean server or after the registration has failed. If the implementation of this method throws a This might be confusing for the code calling
|
preDeregister | back to summary |
---|---|
public void preDeregister() throws Exception Allows the MBean to perform any operations it needs before being unregistered by the MBean server.
|
preRegister | back to summary |
---|---|
public ObjectName preRegister(MBeanServer server, ObjectName name) throws Exception Allows the MBean to perform any operations it needs before being registered in the MBean Server. If the name of the MBean is not specified, the MBean can provide a name for its registration. If any exception is raised, the MBean will not be registered in the MBean Server.
|