站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 jmx API Documentation 英文版文档

MBeanRegistration (JBoss/JMX API) - JBoss 4.0.1 sp1 jmx API Documentation 英文版文档


javax.management
Interface MBeanRegistration

All Known Subinterfaces:
MBeanInvoker, SharedInterceptor
All Known Implementing Classes:
AbstractMBeanInvoker, AbstractSharedInterceptor, MLet, Monitor, RelationService, RelationSupport, RequiredModelMBean, Timer, UnifiedLoaderRepository3

public interface MBeanRegistration

This interface is implemented by an MBean that wants to perform operations pre and post registration and deregistration.

The preRegister method is called by the MBeanServer before registration.

The postRegister method is called by the MBeanServer after registration.

The preDeregister method is called by the MBeanServer before deregistration.

The postDeregister method is called by the MBeanServer after deregistration.

Version:
$Revision: 1.3 $
Author:
Adrian Brock.

Method Summary
 void postDeregister()
          This method is called by the MBeanServer after deregistration takes place.
 void postRegister(Boolean registrationDone)
          This method is called by the MBeanServer after registration takes place or when registration fails.
 void preDeregister()
          This method is called by the MBeanServer before deregistration takes place.
 ObjectName preRegister(MBeanServer server, ObjectName name)
          This method is called by the MBeanServer before registration takes place.
 

Method Detail

preRegister

public ObjectName preRegister(MBeanServer server,
                              ObjectName name)
                       throws Exception
This method is called by the MBeanServer before registration takes place. The MBean is passed a reference of the MBeanServer it is about to be registered with. The MBean must return the ObjectName it will be registered with. The MBeanServer can pass a suggested object depending upon how the MBean is registered.

The MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.

Returns:
the actual ObjectName to register this MBean with.
Throws:
Exception - for any error, the MBean is not registered.

postRegister

public void postRegister(Boolean registrationDone)
This method is called by the MBeanServer after registration takes place or when registration fails.

Parameters:
registrationDone - the MBeanServer passes true when the MBean was registered, false otherwise.

preDeregister

public void preDeregister()
                   throws Exception
This method is called by the MBeanServer before deregistration takes place.

The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.

Throws:
Exception

postDeregister

public void postDeregister()
This method is called by the MBeanServer after deregistration takes place.



Copyright © 2002 JBoss Group, LLC. All Rights Reserved.