Package org.apache.webbeans.intercept
Class NormalScopedBeanInterceptorHandler
- java.lang.Object
-
- org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler
-
- All Implemented Interfaces:
Serializable,javax.inject.Provider
- Direct Known Subclasses:
ApplicationScopedBeanInterceptorHandler,RequestScopedBeanInterceptorHandler,SessionScopedBeanInterceptorHandler
public class NormalScopedBeanInterceptorHandler extends Object implements javax.inject.Provider, Serializable
A Provider which handles all NormalScoped proxying. It's two main responsibilities are to provide the one active Contextual Instance, the second is to provide serialisation.
The generated proxy will writeReplace() with this class and any NormalScopedBean provider must readResolve() and regenerate the proxy class from the
NormalScopeProxyFactoryagain.Any subclass should either declare all their fields
transientor handle the serialisation properly!- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.enterprise.inject.spi.Bean<?>bean
-
Constructor Summary
Constructors Constructor Description NormalScopedBeanInterceptorHandler(javax.enterprise.inject.spi.BeanManager beanManager, javax.enterprise.inject.spi.Bean<?> bean)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectget()javax.enterprise.inject.spi.Bean<?>getBean()protected javax.enterprise.inject.spi.BeanManagergetBeanManager()protected ObjectgetContextualInstance()protected ObjectreadResolve()The following code gets generated into the proxy:
-
-
-
Method Detail
-
get
public Object get()
- Specified by:
getin interfacejavax.inject.Provider
-
getBean
public javax.enterprise.inject.spi.Bean<?> getBean()
-
getBeanManager
protected javax.enterprise.inject.spi.BeanManager getBeanManager()
-
getContextualInstance
protected Object getContextualInstance()
-
readResolve
protected Object readResolve() throws ObjectStreamException
The following code gets generated into the proxy:Object writeReplace() throws ObjectStreamException { return provider; }- Throws:
ObjectStreamException
-
-