org.jboss.test.aop.bean
Class AOPTester

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport (src) 
      extended byorg.jboss.system.ServiceMBeanSupport (src) 
          extended byorg.jboss.test.aop.bean.AOPTester
All Implemented Interfaces:
AOPTesterMBean (src) , MBeanRegistration (src) , NotificationBroadcaster (src) , NotificationEmitter (src) , Service (src) , ServiceMBean (src)

public class AOPTester
extends ServiceMBeanSupport (src)
implements AOPTesterMBean (src) , MBeanRegistration (src)


Field Summary
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport (src)
server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean (src)
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
AOPTester()
           
 
Method Summary
 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.
protected  void startService()
          Sub-classes should override this method to provide custum 'start' logic.
protected  void stopService()
          Sub-classes should override this method to provide custum 'stop' logic.
 void testAspect()
           
 void testBasic()
           
 void testCallerPointcut()
           
 void testConstructorInterception()
           
 void testDynamicInterceptors()
           
 void testExceptions()
           
 void testFieldInterception()
           
 void testInheritance()
           
 void testMetadata()
           
 void testMethodInterception()
           
 void testMixin()
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport (src)
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport (src)
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.system.ServiceMBean (src)
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service (src)
create, destroy, start, stop
 

Constructor Detail

AOPTester

public AOPTester()
Method Detail

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)
Overrides:
preRegister in class ServiceMBeanSupport (src)
Parameters:
server - Reference to the JMX Agent this MBean is registered on
name - Name specified by the creator of the MBean. Note that you can overwrite it when the given ObjectName is null otherwise the change is discarded (maybe a bug in JMX-RI).
Throws:
java.lang.Exception

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)
Overrides:
postRegister in class ServiceMBeanSupport (src)

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)
Overrides:
preDeregister in class ServiceMBeanSupport (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)
Overrides:
postDeregister in class ServiceMBeanSupport (src)

startService

protected void startService()
                     throws java.lang.Exception
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'start' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
startService in class ServiceMBeanSupport (src)
Throws:
java.lang.Exception

stopService

protected void stopService()
Description copied from class: ServiceMBeanSupport (src)
Sub-classes should override this method to provide custum 'stop' logic.

This method is empty, and is provided for convenience when concrete service classes do not need to perform anything specific for this state change.

Overrides:
stopService in class ServiceMBeanSupport (src)

testBasic

public void testBasic()
Specified by:
testBasic in interface AOPTesterMBean (src)

testInheritance

public void testInheritance()
Specified by:
testInheritance in interface AOPTesterMBean (src)

testMetadata

public void testMetadata()
Specified by:
testMetadata in interface AOPTesterMBean (src)

testDynamicInterceptors

public void testDynamicInterceptors()
Specified by:
testDynamicInterceptors in interface AOPTesterMBean (src)

testFieldInterception

public void testFieldInterception()
Specified by:
testFieldInterception in interface AOPTesterMBean (src)

testMethodInterception

public void testMethodInterception()
Specified by:
testMethodInterception in interface AOPTesterMBean (src)

testAspect

public void testAspect()
Specified by:
testAspect in interface AOPTesterMBean (src)

testConstructorInterception

public void testConstructorInterception()
Specified by:
testConstructorInterception in interface AOPTesterMBean (src)

testExceptions

public void testExceptions()
Specified by:
testExceptions in interface AOPTesterMBean (src)

testMixin

public void testMixin()
Specified by:
testMixin in interface AOPTesterMBean (src)

testCallerPointcut

public void testCallerPointcut()
Specified by:
testCallerPointcut in interface AOPTesterMBean (src)