T - public interface Interceptor<T> extends Bean<T>
| Modifier and Type | Method and Description |
|---|---|
Set<Annotation> |
getInterceptorBindings()
Usually a single Interceptor
|
Object |
intercept(InterceptionType type,
T instance,
javax.interceptor.InvocationContext ctx)
Perform the interception.
|
boolean |
intercepts(InterceptionType type) |
getBeanClass, getInjectionPoints, isNullablecreate, destroygetName, getQualifiers, getScope, getStereotypes, getTypes, isAlternativeSet<Annotation> getInterceptorBindings()
InterceptorBindings handled by this interceptor.boolean intercepts(InterceptionType type)
type - InterceptionType in questiontrue if this interceptor handles the given InterceptionType, false otherwiseObject intercept(InterceptionType type, T instance, javax.interceptor.InvocationContext ctx) throws Exception
type - the InterceptionType. This is important if an interceptor has multiple interceptor methods
e.g. one @AroundInvoke and one @PostConstruct;instance - the interceptor instancectx - the InvocationContext contains all the interceptor chain state for a single invocation.Exception - wrapped from the intercepted instance. See CDI-115Copyright © 2021. All rights reserved.