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

java.lang.Object
  extended byorg.jboss.test.jbossmx.compliance.registration.support.RegistrationAware
All Implemented Interfaces:
MBeanRegistration (src) , RegistrationAwareMBean (src)

public class RegistrationAware
extends java.lang.Object
implements RegistrationAwareMBean (src) , MBeanRegistration (src)


Constructor Summary
RegistrationAware()
           
 
Method Summary
 ObjectName (src) getRegisteredObjectName()
           
 MBeanServer (src) getRegisteredServer()
           
 java.lang.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(java.lang.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 (src) preRegister(MBeanServer (src)  server, ObjectName (src)  name)
          This method is called by the MBeanServer before registration takes place.
 void setAlternateObjectName(ObjectName (src)  alternateObjectName)
           
 void setExceptionOnPreDeRegister(java.lang.Exception exceptionOnPreDeRegister)
           
 void setExceptionOnPreRegister(java.lang.Exception exceptionOnPreRegister)
           
 void setSomething(java.lang.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(java.lang.String something)
Specified by:
setSomething in interface RegistrationAwareMBean (src)

getSomething

public java.lang.String getSomething()
Specified by:
getSomething in interface RegistrationAwareMBean (src)

preRegister

public ObjectName (src)  preRegister(MBeanServer (src)  server,
                              ObjectName (src)  name)
                       throws java.lang.Exception
Description copied from interface: MBeanRegistration (src)
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 MBeanRegistration (src)
Returns:
the actual ObjectName to register this MBean with.
Throws:
java.lang.Exception - for any error, the MBean is not registered.

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Description copied from interface: MBeanRegistration (src)
This method is called by the MBeanServer after registration takes place or when registration fails.

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

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Description copied from interface: MBeanRegistration (src)
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 MBeanRegistration (src)
Throws:
java.lang.Exception

postDeregister

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

Specified by:
postDeregister in interface MBeanRegistration (src)

setExceptionOnPreRegister

public void setExceptionOnPreRegister(java.lang.Exception exceptionOnPreRegister)

setExceptionOnPreDeRegister

public void setExceptionOnPreDeRegister(java.lang.Exception exceptionOnPreDeRegister)

setAlternateObjectName

public void setAlternateObjectName(ObjectName (src)  alternateObjectName)

isPreRegisterCalled

public boolean isPreRegisterCalled()

isPreDeRegisterCalled

public boolean isPreDeRegisterCalled()

isPostRegisterCalled

public boolean isPostRegisterCalled()

isPostDeRegisterCalled

public boolean isPostDeRegisterCalled()

isPostRegisterRegistrationDone

public boolean isPostRegisterRegistrationDone()

getRegisteredServer

public MBeanServer (src)  getRegisteredServer()

getRegisteredObjectName

public ObjectName (src)  getRegisteredObjectName()