Save This Page
Home » JBoss-5.1.0 » org » jboss » deployment » [javadoc | source]
org.jboss.deployment
abstract public class: SubDeployerInterceptorSupport [javadoc | source]
java.lang.Object
   org.jboss.mx.util.JBossNotificationBroadcasterSupport
      org.jboss.system.ServiceMBeanSupport
         org.jboss.system.InterceptorServiceMBeanSupport
            org.jboss.deployment.SubDeployerInterceptorSupport

All Implemented Interfaces:
    SubDeployerInterceptorMBean, InterceptorServiceMBean, KernelControllerContextAware, ServiceMBean, MBeanRegistration, NotificationEmitter

Base class that can be used for writing services that dynamically hook to other interceptable deployers in order to add functionality in the deployment cycle. We override attach() to install a different interceptor from that of the base class that understands SubDeployer calls. Note that the baseclass invoke(Invocation) won't be called, so no need to override it. Simply call attach()/detach() from createService()/destroyService() or startService()/stopService() pair methods to attach/detach the interceptor to the configured Interceptable SubDeployer(s). Then override any of the init/create/start/stop/destroy methods to apply the extra interception functionality. Inside those methods don't forget to forward the call using invokeNext().
Fields inherited from org.jboss.system.ServiceMBeanSupport:
SERVICE_CONTROLLER_SIG,  log,  server,  serviceName
Constructor:
 public SubDeployerInterceptorSupport() 
 public SubDeployerInterceptorSupport(Class type) 
    Constructs an SubDeployerInterceptorSupport. Pass-through to InterceptorServiceMBeanSupport.
    Parameters:
    type - The class type to determine Logger name from.
 public SubDeployerInterceptorSupport(String category) 
    Constructs an SubDeployerInterceptorSupport. Pass-through to InterceptorServiceMBeanSupport.
    Parameters:
    category - The logger category name.
 public SubDeployerInterceptorSupport(Logger log) 
    Constructs an SubDeployerInterceptorSupport. Pass-through to InterceptorServiceMBeanSupport.
    Parameters:
    log - The logger to use.
Method from org.jboss.deployment.SubDeployerInterceptorSupport Summary:
attach,   create,   destroy,   init,   start,   stop
Methods from org.jboss.system.InterceptorServiceMBeanSupport:
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:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.jboss.deployment.SubDeployerInterceptorSupport Detail:
 protected  void attach() throws Exception 
    We override attach() from InterceptorServiceMBeanSupport to attach a different interceptor that knows how to switch init/create/start/stop/destroy SubDeployer calls.
 protected Object create(Invocation invocation,
    DeploymentInfo di) throws Throwable 
    Override
 protected Object destroy(Invocation invocation,
    DeploymentInfo di) throws Throwable 
    Override
 protected Object init(Invocation invocation,
    DeploymentInfo di) throws Throwable 
    Override
 protected Object start(Invocation invocation,
    DeploymentInfo di) throws Throwable 
    Override
 protected Object stop(Invocation invocation,
    DeploymentInfo di) throws Throwable 
    Override