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:
- Contextual<T>, Bean<T>, Interceptor<T>, PassivationCapable, OwbBean<T>, BeanAttributes<T>
- Direct Known Subclasses:
- CdiInterceptorBean, EjbInterceptorBean, SelfInterceptorBean
public abstract class InterceptorBean<T>
- extends InjectionTargetBean<T>
- implements Interceptor<T>
Abstract Interceptor Bean implementation.
Any Interceptor is also an InjectionTarget as they can contain
@Inject InjectionPoints.
|
Constructor Summary |
protected |
InterceptorBean(WebBeansContext webBeansContext,
AnnotatedType<T> annotatedType,
BeanAttributes<T> beanAttributes,
Class<T> beanClass,
Map<InterceptionType,Method[]> interceptionMethods,
Method aroundConstruct,
InjectionTargetFactoryImpl<T> factory)
|
|
InterceptorBean(WebBeansContext webBeansContext,
AnnotatedType<T> annotatedType,
BeanAttributesImpl<T> beanAttributes,
Class<T> beanClass,
Map<InterceptionType,Method[]> interceptionMethods,
Method aroundConstructMethod)
|
| Methods inherited from class org.apache.webbeans.component.AbstractOwbBean |
create, destroy, getBeanClass, getId, getInjectionPoints, getLogger, getReturnType, getWebBeansContext, getWebBeansType, isAlternative, isDependent, isEnabled, isPassivationCapable, isSpecializedBean, setEnabled, setSpecializedBean, toString |
aroundInvokeMethod
protected Method aroundInvokeMethod
- This is for performance reasons
aroundConstructMethod
protected Method aroundConstructMethod
InterceptorBean
protected InterceptorBean(WebBeansContext webBeansContext,
AnnotatedType<T> annotatedType,
BeanAttributes<T> beanAttributes,
Class<T> beanClass,
Map<InterceptionType,Method[]> interceptionMethods,
Method aroundConstruct,
InjectionTargetFactoryImpl<T> factory)
InterceptorBean
public InterceptorBean(WebBeansContext webBeansContext,
AnnotatedType<T> annotatedType,
BeanAttributesImpl<T> beanAttributes,
Class<T> beanClass,
Map<InterceptionType,Method[]> interceptionMethods,
Method aroundConstructMethod)
getScope
public Class<? extends Annotation> getScope()
- Interceptors are by default @Dependent scoped.
- Specified by:
getScope in interface Bean<T>- Specified by:
getScope in interface BeanAttributes<T>- Overrides:
getScope in class BeanAttributesImpl<T>
getInterceptorMethods
public Method[] getInterceptorMethods(InterceptionType interceptionType)
- Parameters:
interceptionType -
- Returns:
- the underlying interceptor method for the given InterceptionType or
null
intercepts
public boolean intercepts(InterceptionType interceptionType)
- Specified by:
intercepts in interface Interceptor<T>
intercept
public Object intercept(InterceptionType interceptionType,
T instance,
InvocationContext invocationContext)
- Specified by:
intercept in interface Interceptor<T>
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.