public class DelegatingInvocationContext extends Object implements InvocationContext
| Constructor and Description |
|---|
DelegatingInvocationContext(InvocationContext delegate)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getContextData()
Returns the context data associated with this invocation or lifecycle callback.
|
Method |
getMethod()
Get the invoked method for this invocation.
|
Object[] |
getParameters()
Get the parameters of the method invocation (for method interceptors).
|
Object |
getTarget()
Get the target instance for this invocation.
|
Object |
getTimer()
Get the timer associated with an
@AroundTimeout interceptor method. |
Object |
proceed()
Proceed with the next stage of invocation processing.
|
void |
setParameters(Object[] params)
Replace the parameters of the method invocation.
|
public DelegatingInvocationContext(InvocationContext delegate)
delegate - the delegate contextpublic Object getTarget()
getTarget in interface InvocationContextpublic Method getMethod()
@AroundInvoke or
@AroundTimeout interceptor method, the method of the target class is returned. For
lifecycle callback interceptors (such as @PostConstruct or @PreDestroy), null is returned.getMethod in interface InvocationContextnull if none applies to the current invocation contextpublic Object[] getParameters()
getParameters in interface InvocationContextpublic void setParameters(Object[] params)
setParameters in interface InvocationContextparams - the new parameter values to use for the current invocationpublic Map<String,Object> getContextData()
MessageContext. If there is no context data, an empty Map object will be returned. Normally,
information stored in this map is available to subsequent interceptors in an interceptor chain, so this mechanism
may be used to pass information from one interceptor to the next.getContextData in interface InvocationContextpublic Object getTimer()
@AroundTimeout interceptor method. When intercepting
an EJB component timeout, the returned type is Timer.getTimer in interface InvocationContextnull if the invocation did not apply to a timeout method.public Object proceed() throws Exception
If the intercepted method's return type is void, or if this is a lifecycle method interceptor, then
null is returned from this method, and should be returned by the interceptor as well.
proceed in interface InvocationContextException - if an exception is thrown by subsequent processingCopyright © 2012 JBoss by Red Hat. All Rights Reserved.