Package org.jboss.weld.interceptor.proxy
Class WeldInvocationContextImpl
- java.lang.Object
-
- org.jboss.weld.util.ForwardingInvocationContext
-
- org.jboss.weld.interceptor.proxy.WeldInvocationContextImpl
-
- All Implemented Interfaces:
jakarta.interceptor.InvocationContext
,org.jboss.weld.interceptor.WeldInvocationContext
public class WeldInvocationContextImpl extends ForwardingInvocationContext implements org.jboss.weld.interceptor.WeldInvocationContext
Weld'sInvocationContext
implementation. 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 WeldInvocationContextImpl(jakarta.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)
WeldInvocationContextImpl(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected jakarta.interceptor.InvocationContext
delegate()
Set<Annotation>
getInterceptorBindings()
<T extends Annotation>
Set<T>getInterceptorBindingsByType(Class<T> annotationType)
boolean
hasNextInterceptor()
protected Object
interceptorChainCompleted()
protected Object
invokeNext()
Object
proceed()
-
Methods inherited from class org.jboss.weld.util.ForwardingInvocationContext
equals, getConstructor, getContextData, getMethod, getParameters, getTarget, getTimer, hashCode, setParameters, toString
-
-
-
-
Constructor Detail
-
WeldInvocationContextImpl
public WeldInvocationContextImpl(Constructor<?> constructor, Object[] parameters, Map<String,Object> contextData, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings)
-
WeldInvocationContextImpl
public WeldInvocationContextImpl(Object target, Method targetMethod, Method proceed, Object[] parameters, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings, InterceptionDecorationContext.Stack stack)
-
WeldInvocationContextImpl
public WeldInvocationContextImpl(jakarta.interceptor.InvocationContext delegate, List<InterceptorMethodInvocation> chain, Set<Annotation> interceptorBindings, CombinedInterceptorAndDecoratorStackMethodHandler currentHandler)
-
-
Method Detail
-
delegate
protected jakarta.interceptor.InvocationContext delegate()
- Specified by:
delegate
in classForwardingInvocationContext
-
hasNextInterceptor
public boolean hasNextInterceptor()
-
interceptorChainCompleted
protected Object interceptorChainCompleted() throws Exception
- Throws:
Exception
-
proceed
public Object proceed() throws Exception
- Specified by:
proceed
in interfacejakarta.interceptor.InvocationContext
- Overrides:
proceed
in classForwardingInvocationContext
- Throws:
Exception
-
getInterceptorBindingsByType
public <T extends Annotation> Set<T> getInterceptorBindingsByType(Class<T> annotationType)
- Specified by:
getInterceptorBindingsByType
in interfaceorg.jboss.weld.interceptor.WeldInvocationContext
-
getInterceptorBindings
public Set<Annotation> getInterceptorBindings()
- Specified by:
getInterceptorBindings
in interfaceorg.jboss.weld.interceptor.WeldInvocationContext
-
-