|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines MBean interceptors. All MBean interceptors must implement this interface.
AbstractInterceptor
(src) Method Summary | |
void |
destroy()
This method is part of the interceptor lifecycle. |
java.lang.String |
getName()
Returns the name of this interceptor. |
void |
init()
This method is part of the interceptor's lifecycle. |
java.lang.Object |
invoke(Invocation (src) invocation)
The invoke method is called when the invocation object passes this interceptor. |
boolean |
isShared()
Returns true if this interceptor is shared by multiple invokers; false otherwise. |
void |
setLogger(Logger (src) log)
Called by the MBeanInvoker (src) on
a non-shared interceptors to set a logger reference for this interceptor. |
void |
start()
This method is part of the interceptor's lifecycle. |
void |
stop()
This method is part of the interceptor lifecycle. |
Method Detail |
public java.lang.String getName()
public boolean isShared()
public java.lang.Object invoke(Invocation (src) invocation) throws java.lang.Throwable
java.lang.Throwable
public void setLogger(Logger (src) log)
MBeanInvoker
(src) on
a non-shared interceptors to set a logger reference for this interceptor.
The interceptor implementation may use the invoker's logger for recording
log information. Shared interceptors should set up their log facility through other means as they are invoked by several different MBean invokers. To access the log implementation of the originating invoker for a particular invocation, an interceptor may query they invocation context for invoker reference.
public void init() throws java.lang.Exception
For shared interceptors the lifecycle is driven by the MBean registration. This method is called before the MBean is registered to the server.
Concrete interceptor implementations can override this method to provide initialization code that should be executed before the interceptor is registered.
Any exception that is propagated from this method to its caller will cancel the interceptor registration.
java.lang.Exception
- if you want to cancel the interceptor registrationpublic void start()
For shared interceptors the lifecycle is driven by the MBean registration.
This method is called after the MBean is registered to the
server as part of the
MBeanRegistration.postRegister(java.lang.Boolean)
execution.
Concrete interceptor implementations can override this method to provide initialization code that should be executed once the MBean server and object name references for this interceptor have been resolved.
public void stop() throws java.lang.Exception
For shared interceptors the lifecycle is driven by the MBean
unregistration. This method is called after the MBean is registered to the
server as part of the
MBeanRegistration.preDeregister()
execution.
Concrete interceptor implementations can override this method to provide cleanup code that should be executed before the interceptor is unregistered.
Any exception that is propagated from this method to its caller will cancel the interceptor unregistration.
java.lang.Exception
- if you want to cancel the interceptor unregistrationpublic void destroy()
For shared interceptors the lifecycle is driven by the MBean
unregistration. This method is called after the MBean is registered to the
server as part of the
MBeanRegistration.postDeregister()
execution.
Concrete interceptor implementations can override this method to provide cleanup code that should be executed once the interceptor is no longer registered to the MBean server.
|
||||||||||
PREV CLASS NEXT CLASS (src) | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |