public class WeldInvocationContext extends ForwardingInvocationContext implements ExperimentalInvocationContext
InvocationContext implementation. This is a forwarding implementation that delegates most method calls to an underlying
InvocationContext. This allows multiple interceptor chains to be combined.
A call to proceed() invokes the chain of intercepors in the given order. Once the chain finishes, the proceed() method of the delegate is
invoked which results in the target method being invoked in case of SimpleInvocationContext. Otherwise, the delegate chain is run.| Constructor and Description |
|---|
WeldInvocationContext(Constructor<?> constructor,
Object[] parameters,
Map<String,Object> contextData,
List<InterceptorMethodInvocation> chain,
Set<Annotation> interceptorBindings) |
WeldInvocationContext(javax.interceptor.InvocationContext delegate,
List<InterceptorMethodInvocation> chain,
Set<Annotation> interceptorBindings,
CombinedInterceptorAndDecoratorStackMethodHandler currentHandler) |
WeldInvocationContext(Object target,
Method targetMethod,
Method proceed,
Object[] parameters,
List<InterceptorMethodInvocation> chain,
Set<Annotation> interceptorBindings,
InterceptionDecorationContext.Stack stack) |
| Modifier and Type | Method and Description |
|---|---|
protected javax.interceptor.InvocationContext |
delegate() |
Set<Annotation> |
getInterceptorBindings()
The returning set may be empty if only interceptors using the
Interceptors annotation are associated. |
<T extends Annotation> |
getInterceptorBindingsByType(Class<T> annotationType)
The returning set may be empty if only interceptors using the
Interceptors annotation are associated. |
boolean |
hasNextInterceptor() |
protected Object |
interceptorChainCompleted() |
protected Object |
invokeNext() |
Object |
proceed() |
equals, getConstructor, getContextData, getMethod, getParameters, getTarget, getTimer, hashCode, setParameters, toStringpublic WeldInvocationContext(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings)
public WeldInvocationContext(Object target, Method targetMethod, Method proceed, Object[] parameters, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings, InterceptionDecorationContext.Stack stack)
public WeldInvocationContext(javax.interceptor.InvocationContext delegate,
List<InterceptorMethodInvocation> chain,
Set<Annotation> interceptorBindings,
CombinedInterceptorAndDecoratorStackMethodHandler currentHandler)
protected javax.interceptor.InvocationContext delegate()
delegate in class ForwardingInvocationContextpublic boolean hasNextInterceptor()
protected Object interceptorChainCompleted() throws Exception
Exceptionpublic Object proceed() throws Exception
proceed in interface javax.interceptor.InvocationContextproceed in class ForwardingInvocationContextExceptionpublic <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType)
ExperimentalInvocationContextInterceptors annotation are associated.getInterceptorBindingsByType in interface ExperimentalInvocationContextT - subclass of AnnotationannotationType - type of annotationpublic Set<Annotation> getInterceptorBindings()
ExperimentalInvocationContextInterceptors annotation are associated.getInterceptorBindings in interface ExperimentalInvocationContextCopyright © 2015. All Rights Reserved.