public class RequestScopedBeanInterceptorHandler extends NormalScopedBeanInterceptorHandler
This is a MethodHandler especially
made for @RequestScoped beans used in web applications.
Since there is only one single contextual instance of an @RequestScoped bean per thread, we can simply cache this instance inside our bean. We only need to reload this instance if it is null or if the thread ends.
bean, interceptedMethodMap, webBeansContext| Constructor and Description |
|---|
RequestScopedBeanInterceptorHandler(OwbBean<?> bean,
javax.enterprise.context.spi.CreationalContext<?> creationalContext)
Creates a new handler.
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.enterprise.context.spi.CreationalContext<Object> |
getContextualCreationalContext() |
protected Object |
getContextualInstance() |
static void |
removeThreadLocals() |
callAroundInvokes, invoke, invoke, isNotInterceptedOrDecoratedMethod, setNotInterceptedOrDecoratedMethodgetBeanManager, invoke, invokepublic RequestScopedBeanInterceptorHandler(OwbBean<?> bean, javax.enterprise.context.spi.CreationalContext<?> creationalContext)
bean - beancreationalContext - creaitonal contextpublic static void removeThreadLocals()
protected Object getContextualInstance()
getContextualInstance in class NormalScopedBeanInterceptorHandlerprotected javax.enterprise.context.spi.CreationalContext<Object> getContextualCreationalContext()
getContextualCreationalContext in class NormalScopedBeanInterceptorHandlerCopyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.