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 NormalScopeProxyFactory
again.
Any subclass should either declare all their fields transient
or handle the serialisation properly!
| Modifier and Type | Field and Description |
|---|---|
protected javax.enterprise.inject.spi.Bean<?> |
bean |
| Constructor and Description |
|---|
NormalScopedBeanInterceptorHandler(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.inject.spi.Bean<?> bean) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get() |
javax.enterprise.inject.spi.Bean<?> |
getBean() |
protected javax.enterprise.inject.spi.BeanManager |
getBeanManager() |
protected Object |
getContextualInstance() |
protected Object |
readResolve()
The following code gets generated into the proxy:
Object writeReplace() throws ObjectStreamException
{
return provider;
}
|
public NormalScopedBeanInterceptorHandler(javax.enterprise.inject.spi.BeanManager beanManager,
javax.enterprise.inject.spi.Bean<?> bean)
public Object get()
get in interface javax.inject.Providerpublic javax.enterprise.inject.spi.Bean<?> getBean()
protected javax.enterprise.inject.spi.BeanManager getBeanManager()
protected Object getContextualInstance()
protected Object readResolve() throws ObjectStreamException
Object writeReplace() throws ObjectStreamException
{
return provider;
}
ObjectStreamExceptionCopyright © 2008–2020 The Apache Software Foundation. All rights reserved.