|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface InvocationContext
Allow interceptor and lifecycle methods to control the behavior of the invocation chain.
The same InvocationContext instance is passed to each interceptor
method for a given business method or lifecycle event interception. This
allows an interceptor to save information in the context data property of the
InvocationContext that can be subsequently retrieved in other
interceptors as means to pass contextual data between interceptors. The
contextual data is not shareable across separate business method invocations
or lifecycle callback events. The lifecycle of the InvocationContext
is instance otherwise unspecified.
| Method Summary | |
|---|---|
Map<String,Object> |
getContextData()
Returns a map that can be used to pass contextual data between interceptors of the interceptor chain. |
Method |
getMethod()
The method that is intercepted. |
Object[] |
getParameters()
Returns the parameter of the current invocation. |
Object |
getTarget()
Returns the underlying object. |
Object |
proceed()
Invokes the next interceptor in the chain, or, when called from the last interceptor, the business method. |
void |
setParameters(Object[] parameters)
Allows the caller to modify the parameters of the current invocation. |
| Method Detail |
|---|
Map<String,Object> getContextData()
Method getMethod()
throws BeanletStateException
null,
since only methods can be intercepted.
BeanletStateException - if this method is called from an lifecycle
interceptor.
Object[] getParameters()
throws BeanletStateException
BeanletStateException - if this method is called from an lifecycle
interceptor.
void setParameters(Object[] parameters)
throws BeanletStateException
BeanletStateException - if this method is called from an lifecycle
interceptor.
Object proceed()
throws Exception
InvocationContext.proceed() or nu subsequent interceptor methods
or lifecycle callback methods or business method will be invoked. The
proceed method returns the result of the next method invoked. If
a method returns void, proceed returns null. For
lifecycle callback methods, if there is no callback method defined on the
beanlet class, the invocation of proceed in the last method in
the chain is a on-op, and null is returned. If there is more than
one such method, the invocation of proceed causes the application
container to execute those methods in order.
ExceptionObject getTarget()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||