org.jboss.test.jmx.compliance.registration.support
Class RegistrationAware

java.lang.Object
  extended byorg.jboss.test.jmx.compliance.registration.support.RegistrationAware
All Implemented Interfaces:
javax.management.MBeanRegistration, RegistrationAwareMBean

public class RegistrationAware
extends Object
implements RegistrationAwareMBean, javax.management.MBeanRegistration


Constructor Summary
RegistrationAware()
           
 
Method Summary
 javax.management.ObjectName getRegisteredObjectName()
           
 javax.management.MBeanServer getRegisteredServer()
           
 String getSomething()
           
 boolean isPostDeRegisterCalled()
           
 boolean isPostRegisterCalled()
           
 boolean isPostRegisterRegistrationDone()
           
 boolean isPreDeRegisterCalled()
           
 boolean isPreRegisterCalled()
           
 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.
 javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
          This method is called by the MBeanServer before registration takes place.
 void setAlternateObjectName(javax.management.ObjectName alternateObjectName)
           
 void setExceptionOnPreDeRegister(Exception exceptionOnPreDeRegister)
           
 void setExceptionOnPreRegister(Exception exceptionOnPreRegister)
           
 void setSomething(String something)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistrationAware

public RegistrationAware()
Method Detail

setSomething

public void setSomething(String something)
Specified by:
setSomething in interface RegistrationAwareMBean

getSomething

public String getSomething()
Specified by:
getSomething in interface RegistrationAwareMBean

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                               javax.management.ObjectName name)
                                        throws Exception
Description copied from interface: javax.management.MBeanRegistration
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.

Specified by:
preRegister in interface javax.management.MBeanRegistration
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)
Description copied from interface: javax.management.MBeanRegistration
This method is called by the MBeanServer after registration takes place or when registration fails.

Specified by:
postRegister in interface javax.management.MBeanRegistration
Parameters:
registrationDone - the MBeanServer passes true when the MBean was registered, false otherwise.

preDeregister

public void preDeregister()
                   throws Exception
Description copied from interface: javax.management.MBeanRegistration
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.

Specified by:
preDeregister in interface javax.management.MBeanRegistration
Throws:
Exception

postDeregister

public void postDeregister()
Description copied from interface: javax.management.MBeanRegistration
This method is called by the MBeanServer after deregistration takes place.

Specified by:
postDeregister in interface javax.management.MBeanRegistration

setExceptionOnPreRegister

public void setExceptionOnPreRegister(Exception exceptionOnPreRegister)

setExceptionOnPreDeRegister

public void setExceptionOnPreDeRegister(Exception exceptionOnPreDeRegister)

setAlternateObjectName

public void setAlternateObjectName(javax.management.ObjectName alternateObjectName)

isPreRegisterCalled

public boolean isPreRegisterCalled()

isPreDeRegisterCalled

public boolean isPreDeRegisterCalled()

isPostRegisterCalled

public boolean isPostRegisterCalled()

isPostDeRegisterCalled

public boolean isPostDeRegisterCalled()

isPostRegisterRegistrationDone

public boolean isPostRegisterRegistrationDone()

getRegisteredServer

public javax.management.MBeanServer getRegisteredServer()

getRegisteredObjectName

public javax.management.ObjectName getRegisteredObjectName()


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