public class WeldInvocationContextImpl extends ForwardingInvocationContext implements WeldInvocationContext
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 |
|---|
WeldInvocationContextImpl(Constructor<?> constructor,
Object[] parameters,
Map<String,Object> contextData,
List<InterceptorMethodInvocation> chain,
Set<Annotation> interceptorBindings) |
WeldInvocationContextImpl(javax.interceptor.InvocationContext delegate,
List<InterceptorMethodInvocation> chain,
Set<Annotation> interceptorBindings,
CombinedInterceptorAndDecoratorStackMethodHandler currentHandler) |
WeldInvocationContextImpl(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()
Return the set of interceptor bindings for a lifecycle callback, business method, timeout method, or constructor.
|
<T extends Annotation> |
getInterceptorBindingsByType(Class<T> annotationType)
Return the set of interceptor bindings with the specified annotation type.
|
boolean |
hasNextInterceptor() |
protected Object |
interceptorChainCompleted() |
protected Object |
invokeNext() |
Object |
proceed() |
equals, getConstructor, getContextData, getMethod, getParameters, getTarget, getTimer, hashCode, setParameters, toStringpublic WeldInvocationContextImpl(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings)
public WeldInvocationContextImpl(Object target, Method targetMethod, Method proceed, Object[] parameters, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings, InterceptionDecorationContext.Stack stack)
public WeldInvocationContextImpl(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)
WeldInvocationContextgetInterceptorBindingsByType in interface WeldInvocationContextT - subclass of AnnotationannotationType - type of annotationWeldInvocationContext.getInterceptorBindings()public Set<Annotation> getInterceptorBindings()
WeldInvocationContext
The returned set may be empty if only interceptors using the Interceptors annotation are associated.
getInterceptorBindings in interface WeldInvocationContextCopyright © 2017. All rights reserved.