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,WeldInvocationContext
public class WeldInvocationContextImpl
extends ForwardingInvocationContext
implements WeldInvocationContext
Weld's
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.- Author:
- Jozef Hartinger
-
Field Summary
Fields inherited from interface org.jboss.weld.interceptor.WeldInvocationContext
INTERCEPTOR_BINDINGS_KEY -
Constructor Summary
ConstructorsConstructorDescriptionWeldInvocationContextImpl(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
Modifier and TypeMethodDescriptionprotected jakarta.interceptor.InvocationContextdelegate()<T extends Annotation>
Set<T>getInterceptorBindingsByType(Class<T> annotationType) booleanprotected Objectprotected Objectproceed()Methods inherited from class org.jboss.weld.util.ForwardingInvocationContext
equals, getConstructor, getContextData, getMethod, getParameters, getTarget, getTimer, hashCode, setParameters, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.interceptor.InvocationContext
getConstructor, getContextData, getInterceptorBinding, getInterceptorBindings, getMethod, getParameters, getTarget, getTimer, setParameters
-
Constructor Details
-
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 Details
-
delegate
protected jakarta.interceptor.InvocationContext delegate()- Specified by:
delegatein classForwardingInvocationContext
-
hasNextInterceptor
public boolean hasNextInterceptor() -
invokeNext
- Throws:
Exception
-
interceptorChainCompleted
- Throws:
Exception
-
proceed
- Specified by:
proceedin interfacejakarta.interceptor.InvocationContext- Overrides:
proceedin classForwardingInvocationContext- Throws:
Exception
-
getInterceptorBindingsByType
- Specified by:
getInterceptorBindingsByTypein interfaceWeldInvocationContext- Type Parameters:
T- annotation type- Parameters:
annotationType- type of the interceptor binding annotations- Returns:
- immutable set of interceptor binding annotations of given type, never null
-
getInterceptorBindings
- Specified by:
getInterceptorBindingsin interfacejakarta.interceptor.InvocationContext
-