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(java.lang.reflect.Constructor<?> constructor,
java.lang.Object[] parameters,
java.util.Map<java.lang.String,java.lang.Object> contextData,
java.util.List<InterceptorMethodInvocation> chain,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings) |
WeldInvocationContext(InvocationContext delegate,
java.util.List<InterceptorMethodInvocation> chain,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings,
CombinedInterceptorAndDecoratorStackMethodHandler currentHandler) |
WeldInvocationContext(java.lang.Object target,
java.lang.reflect.Method targetMethod,
java.lang.reflect.Method proceed,
java.lang.Object[] parameters,
java.util.List<InterceptorMethodInvocation> chain,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings,
CombinedInterceptorAndDecoratorStackMethodHandler currentHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected InvocationContext |
delegate() |
java.util.Set<java.lang.annotation.Annotation> |
getInterceptorBindings()
The returning set may be empty if only interceptors using the
Interceptors annotation are associated. |
<T extends java.lang.annotation.Annotation> |
getInterceptorBindingsByType(java.lang.Class<T> annotationType)
The returning set may be empty if only interceptors using the
Interceptors annotation are associated. |
boolean |
hasNextInterceptor() |
protected java.lang.Object |
interceptorChainCompleted() |
protected java.lang.Object |
invokeNext() |
java.lang.Object |
proceed() |
equals, getConstructor, getContextData, getMethod, getParameters, getTarget, getTimer, hashCode, setParameters, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetConstructor, getContextData, getMethod, getParameters, getTarget, getTimer, setParameterspublic WeldInvocationContext(java.lang.reflect.Constructor<?> constructor,
java.lang.Object[] parameters,
java.util.Map<java.lang.String,java.lang.Object> contextData,
java.util.List<InterceptorMethodInvocation> chain,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings)
public WeldInvocationContext(java.lang.Object target,
java.lang.reflect.Method targetMethod,
java.lang.reflect.Method proceed,
java.lang.Object[] parameters,
java.util.List<InterceptorMethodInvocation> chain,
java.util.Set<java.lang.annotation.Annotation> interceptorBindings,
CombinedInterceptorAndDecoratorStackMethodHandler currentHandler)
public WeldInvocationContext(InvocationContext delegate, java.util.List<InterceptorMethodInvocation> chain, java.util.Set<java.lang.annotation.Annotation> interceptorBindings, CombinedInterceptorAndDecoratorStackMethodHandler currentHandler)
protected InvocationContext delegate()
delegate in class ForwardingInvocationContextpublic boolean hasNextInterceptor()
protected java.lang.Object invokeNext()
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.Object interceptorChainCompleted()
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.Object proceed()
throws java.lang.Exception
proceed in interface InvocationContextproceed in class ForwardingInvocationContextjava.lang.Exceptionpublic <T extends java.lang.annotation.Annotation> java.util.Set<T> getInterceptorBindingsByType(java.lang.Class<T> annotationType)
ExperimentalInvocationContextInterceptors annotation are associated.getInterceptorBindingsByType in interface ExperimentalInvocationContextpublic java.util.Set<java.lang.annotation.Annotation> getInterceptorBindings()
ExperimentalInvocationContextInterceptors annotation are associated.getInterceptorBindings in interface ExperimentalInvocationContextCopyright © 2014. All Rights Reserved.