Package org.jboss.weld.interceptor.proxy
Class WeldInvocationContext
- java.lang.Object
-
- org.jboss.weld.util.ForwardingInvocationContext
-
- org.jboss.weld.interceptor.proxy.WeldInvocationContext
-
- All Implemented Interfaces:
javax.interceptor.InvocationContext
public class WeldInvocationContext extends ForwardingInvocationContext
Weld'sInvocationContextimplementation. This is a forwarding implementation that delegates most method calls to an underlyingInvocationContext. This allows multiple interceptor chains to be combined. A call toproceed()invokes the chain of intercepors in the given order. Once the chain finishes, theproceed()method of the delegate is invoked which results in the target method being invoked in case ofSimpleInvocationContext. Otherwise, the delegate chain is run.- Author:
- Jozef Hartinger
-
-
Constructor Summary
Constructors Constructor Description WeldInvocationContext(Object target, Method targetMethod, Method proceed, Object[] parameters, List<InterceptorMethodInvocation> chain, InterceptionDecorationContext.Stack stack)WeldInvocationContext(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, List<InterceptorMethodInvocation> chain)WeldInvocationContext(javax.interceptor.InvocationContext delegate, List<InterceptorMethodInvocation> chain)WeldInvocationContext(javax.interceptor.InvocationContext delegate, List<InterceptorMethodInvocation> chain, CombinedInterceptorAndDecoratorStackMethodHandler currentHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected javax.interceptor.InvocationContextdelegate()booleanhasNextInterceptor()protected ObjectinterceptorChainCompleted()protected ObjectinvokeNext()Objectproceed()-
Methods inherited from class org.jboss.weld.util.ForwardingInvocationContext
equals, getConstructor, getContextData, getMethod, getParameters, getTarget, getTimer, hashCode, setParameters, toString
-
-
-
-
Constructor Detail
-
WeldInvocationContext
public WeldInvocationContext(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, List<InterceptorMethodInvocation> chain)
-
WeldInvocationContext
public WeldInvocationContext(Object target, Method targetMethod, Method proceed, Object[] parameters, List<InterceptorMethodInvocation> chain, InterceptionDecorationContext.Stack stack)
-
WeldInvocationContext
public WeldInvocationContext(javax.interceptor.InvocationContext delegate, List<InterceptorMethodInvocation> chain)
-
WeldInvocationContext
public WeldInvocationContext(javax.interceptor.InvocationContext delegate, List<InterceptorMethodInvocation> chain, CombinedInterceptorAndDecoratorStackMethodHandler currentHandler)
-
-
Method Detail
-
delegate
protected javax.interceptor.InvocationContext delegate()
- Specified by:
delegatein classForwardingInvocationContext
-
hasNextInterceptor
public boolean hasNextInterceptor()
-
interceptorChainCompleted
protected Object interceptorChainCompleted() throws Exception
- Throws:
Exception
-
proceed
public Object proceed() throws Exception
- Specified by:
proceedin interfacejavax.interceptor.InvocationContext- Overrides:
proceedin classForwardingInvocationContext- Throws:
Exception
-
-