|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.system.InterceptorServiceMBeanSupport
public abstract class InterceptorServiceMBeanSupport
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).
| Field Summary |
|---|
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
|---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean |
|---|
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
| Constructor Summary | |
|---|---|
InterceptorServiceMBeanSupport()
Constructs an InterceptorServiceMBeanSupport. |
|
InterceptorServiceMBeanSupport(Class type)
Constructs an InterceptorServiceMBeanSupport. |
|
InterceptorServiceMBeanSupport(org.jboss.logging.Logger log)
Constructs an InterceptorServiceMBeanSupport. |
|
InterceptorServiceMBeanSupport(String category)
Constructs an InterceptorServiceMBeanSupport. |
|
| Method Summary | |
|---|---|
protected void |
attach()
Add our interceptor to the target Interceptables. |
protected void |
attach(org.jboss.mx.interceptor.Interceptor interceptor)
Add the provided interceptor to the target Interceptables. |
protected void |
detach()
Remove the interceptor from the target Interceptables |
List |
getInterceptables()
|
protected Object |
invoke(org.jboss.mx.server.Invocation invocation)
Override |
protected Object |
invokeNext(org.jboss.mx.server.Invocation invocation)
Use this to forward the call |
void |
setInterceptables(List interceptables)
The ObjectNames of the MBeans implementing the operations in the org.jboss.mx.server.Interceptable interface |
| Methods inherited from class org.jboss.system.ServiceMBeanSupport |
|---|
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, startService, stop, stopService |
| Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
|---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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 |
|---|
getName, getState, getStateString, jbossInternalLifecycle |
| Methods inherited from interface org.jboss.system.Service |
|---|
create, destroy, start, stop |
| Constructor Detail |
|---|
public InterceptorServiceMBeanSupport()
public InterceptorServiceMBeanSupport(Class type)
type - The class type to determine Logger name from.public InterceptorServiceMBeanSupport(String category)
category - The logger category name.public InterceptorServiceMBeanSupport(org.jboss.logging.Logger log)
log - The logger to use.| Method Detail |
|---|
public void setInterceptables(List interceptables)
InterceptorServiceMBean
setInterceptables in interface InterceptorServiceMBeanpublic List getInterceptables()
getInterceptables in interface InterceptorServiceMBean
protected void attach()
throws Exception
Exception - thrown on any interceptor registration error
protected void attach(org.jboss.mx.interceptor.Interceptor interceptor)
throws Exception
interceptor - the interceptor to add
Exception - thrown on any interceptor registration errorprotected void detach()
protected Object invokeNext(org.jboss.mx.server.Invocation invocation)
throws Throwable
Throwable
protected Object invoke(org.jboss.mx.server.Invocation invocation)
throws Throwable
Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||