Save This Page
Home » jboss-5.0.0.CR1-src » org » jboss » system » [javadoc | source]
org.jboss.system
abstract public class: InterceptorServiceMBeanSupport [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.system.InterceptorServiceMBeanSupport

All Implemented Interfaces:
    InterceptorServiceMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

Direct Known Subclasses:
    SubDeployerInterceptorSupport

Helper class that can be used for writing MBean Services that dynamically hook-up an Interceptor to other (X)MBeans that have been configured as Interceptable. In a nutshell, call attach()/detach() from your createService()/destroyService() or startService()/stopService() pair methods to attach/detach an interceptor to the target mbean(s), then override invoke() to do something with the invocations. You may also provide your own Interceptor, in which case you should call attach(Interceptor).
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public InterceptorServiceMBeanSupport() 
 public InterceptorServiceMBeanSupport(Class type) 
    Constructs an InterceptorServiceMBeanSupport. Pass-through to ServiceMBeanSupport.
    Parameters:
    type - The class type to determine Logger name from.
 public InterceptorServiceMBeanSupport(String category) 
    Constructs an InterceptorServiceMBeanSupport. Pass-through to ServiceMBeanSupport.
    Parameters:
    category - The logger category name.
 public InterceptorServiceMBeanSupport(Logger log) 
    Constructs an InterceptorServiceMBeanSupport. Pass-through to ServiceMBeanSupport.
    Parameters:
    log - The logger to use.
Method from org.jboss.system.InterceptorServiceMBeanSupport Summary:
attach,   attach,   detach,   getInterceptables,   invoke,   invokeNext,   setInterceptables
Methods from org.jboss.system.ServiceMBeanSupport:
create,   createService,   destroy,   destroyService,   getDeploymentInfo,   getLog,   getName,   getNextNotificationSequenceNumber,   getObjectName,   getServer,   getServiceName,   getState,   getStateString,   jbossInternalCreate,   jbossInternalDescription,   jbossInternalDestroy,   jbossInternalLifecycle,   jbossInternalStart,   jbossInternalStop,   pojoChange,   pojoCreate,   pojoDestroy,   pojoStart,   pojoStop,   postDeregister,   postRegister,   preDeregister,   preRegister,   setKernelControllerContext,   start,   startService,   stop,   stopService,   unsetKernelControllerContext
Methods from org.jboss.mx.util.JBossNotificationBroadcasterSupport:
addNotificationListener,   getNotificationInfo,   handleNotification,   nextNotificationSequenceNumber,   removeNotificationListener,   removeNotificationListener,   sendNotification
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.system.InterceptorServiceMBeanSupport Detail:
 protected  void attach() throws Exception 
    Add our interceptor to the target Interceptables. Override invoke(Invocation) to handle the calls.
 protected  void attach(Interceptor interceptor) throws Exception 
    Add the provided interceptor to the target Interceptables.
 protected  void detach() 
    Remove the interceptor from the target Interceptables
 public List getInterceptables() 
 protected Object invoke(Invocation invocation) throws Throwable 
    Override
 protected Object invokeNext(Invocation invocation) throws Throwable 
    Use this to forward the call
 public  void setInterceptables(List interceptables)