javax.management
Interface MBeanRegistration

All Known Implementing Classes:
HttpAdaptor, JythonRunner, LoggerBroadcaster, MLet, Monitor, RelationService, RelationSupport, RequiredModelMBean, RMIAdaptor, SMTP, Timer

public interface MBeanRegistration

Implemented by an MBean that need to carry out operations before and after being registered or de-registered.

Version:
$Revision: 1.3 $
Author:
Simone Bordet

Method Summary
 void postDeregister()
          Called upon after the MBean has been de-registered.
 void postRegister(java.lang.Boolean registrationDone)
          Called upon after a registration ( successful or not ).
 void preDeregister()
          Called upon before an MBean will be de-registered by the MBeanServer.
 ObjectName preRegister(MBeanServer server, ObjectName name)
          Allows the MBean to perform any operations before being registered to the MBeanServer.
 

Method Detail

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws java.lang.Exception
Allows the MBean to perform any operations before being registered to the MBeanServer.

Any exception will cause the MBean not being registered.

Parameters:
server - The MBeanServer on which the MBean will be registered.
name - The ObjectName of the MBean.
Returns:
ObjectName The name of the registered MBean
Throws:
java.lang.Exception - Exception of the operation. Note that this is caught by the MBeanServer and re-thrown as an MBeanRegistrationException.

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Called upon after a registration ( successful or not ).

Parameters:
registrationDone - Evaluates to true of the registrations is successful, false otherwise.

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Called upon before an MBean will be de-registered by the MBeanServer.

Throws:
java.lang.Exception - Would be caught by the MBeanServer and rethrown as an MBeanRegistrationException.

postDeregister

public void postDeregister()
Called upon after the MBean has been de-registered.



Copyright © 2001-2002 MX4J Team. All Rights Reserved.