Package org.apache.webbeans.component
Class InterceptorBean<T>
- java.lang.Object
-
- org.apache.webbeans.component.BeanAttributesImpl<T>
-
- org.apache.webbeans.component.AbstractOwbBean<T>
-
- org.apache.webbeans.component.InjectionTargetBean<T>
-
- org.apache.webbeans.component.InterceptorBean<T>
-
- All Implemented Interfaces:
Serializable,javax.enterprise.context.spi.Contextual<T>,javax.enterprise.inject.spi.Bean<T>,javax.enterprise.inject.spi.BeanAttributes<T>,javax.enterprise.inject.spi.Interceptor<T>,javax.enterprise.inject.spi.PassivationCapable,OwbBean<T>
- Direct Known Subclasses:
CdiInterceptorBean,EjbInterceptorBean,SelfInterceptorBean
public abstract class InterceptorBean<T> extends InjectionTargetBean<T> implements javax.enterprise.inject.spi.Interceptor<T>
Abstract
InterceptorBean implementation.Any Interceptor is also an InjectionTarget as they can contain @Inject InjectionPoints.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInterceptorBean.MultiMethodInvocationContextAn InvocationContext wraper for handling multiple interceptor methods.
-
Field Summary
Fields Modifier and Type Field Description protected MethodaroundInvokeMethodThis is for performance reasons-
Fields inherited from class org.apache.webbeans.component.AbstractOwbBean
enabled, logger, passivatingId, specializedBean, webBeansContext, webBeansType
-
-
Constructor Summary
Constructors Modifier Constructor Description InterceptorBean(WebBeansContext webBeansContext, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, javax.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> beanClass, Map<javax.enterprise.inject.spi.InterceptionType,Method[]> interceptionMethods)protectedInterceptorBean(WebBeansContext webBeansContext, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, javax.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> beanClass, Map<javax.enterprise.inject.spi.InterceptionType,Method[]> interceptionMethods, InjectionTargetFactoryImpl<T> factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Method[]getInterceptorMethods(javax.enterprise.inject.spi.InterceptionType interceptionType)Class<? extends Annotation>getScope()Interceptors are by default @Dependent scoped.Objectintercept(javax.enterprise.inject.spi.InterceptionType interceptionType, T instance, javax.interceptor.InvocationContext invocationContext)booleanintercepts(javax.enterprise.inject.spi.InterceptionType interceptionType)-
Methods inherited from class org.apache.webbeans.component.InjectionTargetBean
defineInterceptorsIfNeeded, getAnnotatedType, getInjectionTarget, getProducer, providedId
-
Methods inherited from class org.apache.webbeans.component.AbstractOwbBean
addToStringInfo, create, destroy, equals, getBeanClass, getId, getInjectionPoints, getLogger, getReturnType, getWebBeansContext, getWebBeansType, hashCode, isDependent, isEnabled, isPassivationCapable, isSpecializedBean, setEnabled, setSpecializedBean, toString
-
Methods inherited from class org.apache.webbeans.component.BeanAttributesImpl
getName, getQualifiers, getStereotypes, getTypes, isAlternative, isNullable
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Bean
getBeanClass, getInjectionPoints, isNullable
-
-
-
-
Field Detail
-
aroundInvokeMethod
protected Method aroundInvokeMethod
This is for performance reasons
-
-
Constructor Detail
-
InterceptorBean
protected InterceptorBean(WebBeansContext webBeansContext, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, javax.enterprise.inject.spi.BeanAttributes<T> beanAttributes, Class<T> beanClass, Map<javax.enterprise.inject.spi.InterceptionType,Method[]> interceptionMethods, InjectionTargetFactoryImpl<T> factory)
-
-
Method Detail
-
getScope
public Class<? extends Annotation> getScope()
Interceptors are by default @Dependent scoped.- Specified by:
getScopein interfacejavax.enterprise.inject.spi.BeanAttributes<T>- Overrides:
getScopein classBeanAttributesImpl<T>
-
getInterceptorMethods
public Method[] getInterceptorMethods(javax.enterprise.inject.spi.InterceptionType interceptionType)
- Parameters:
interceptionType-- Returns:
- the underlying interceptor method for the given InterceptionType or
null
-
intercepts
public boolean intercepts(javax.enterprise.inject.spi.InterceptionType interceptionType)
- Specified by:
interceptsin interfacejavax.enterprise.inject.spi.Interceptor<T>
-
-