Package org.apache.webbeans.intercept
Class RequestScopedBeanInterceptorHandler
- java.lang.Object
-
- org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler
-
- org.apache.webbeans.intercept.RequestScopedBeanInterceptorHandler
-
- All Implemented Interfaces:
Serializable,javax.inject.Provider
public class RequestScopedBeanInterceptorHandler extends NormalScopedBeanInterceptorHandler
This is a
Providerespecially 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.
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler
bean
-
-
Constructor Summary
Constructors Constructor Description RequestScopedBeanInterceptorHandler(javax.enterprise.inject.spi.BeanManager beanManager, javax.enterprise.inject.spi.Bean<?> bean)Creates a new handler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectgetContextualInstance()static voidremoveThreadLocals()-
Methods inherited from class org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler
get, getBean, getBeanManager, readResolve
-
-
-
-
Method Detail
-
removeThreadLocals
public static void removeThreadLocals()
-
getContextualInstance
protected Object getContextualInstance()
- Overrides:
getContextualInstancein classNormalScopedBeanInterceptorHandler
-
-