Package org.apache.webbeans.container
Class SerializableBean<T>
java.lang.Object
org.apache.webbeans.container.SerializableBean<T>
- All Implemented Interfaces:
jakarta.enterprise.context.spi.Contextual<T>,jakarta.enterprise.inject.spi.Bean<T>,jakarta.enterprise.inject.spi.BeanAttributes<T>,jakarta.enterprise.inject.spi.PassivationCapable,Serializable
public final class SerializableBean<T>
extends Object
implements jakarta.enterprise.inject.spi.Bean<T>, jakarta.enterprise.inject.spi.PassivationCapable, Serializable
Wrapper to make all our Beans serializable.
This is basically a delegate to an underlying Bean<T>.
We use the
PassivationCapable.getId() and
BeanManager.getPassivationCapableBean(String)
for serialisation and deserialisation.- Version:
- $Rev$ $Date$
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanIf the other object is a SerializableBean too, we compare the 2 underlying wrapped beans.jakarta.enterprise.inject.spi.Bean<T>getBean()Class<?>getId()Set<jakarta.enterprise.inject.spi.InjectionPoint>getName()Class<? extends Annotation>getScope()Set<Class<? extends Annotation>>getTypes()inthashCode()We need to return the hashCode of the wrapped underlying bean, otherwise the context won't work.boolean
-
Method Details
-
getBean
- Returns:
- the delegated internal Bean.
-
getTypes
- Specified by:
getTypesin interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
getQualifiers
- Specified by:
getQualifiersin interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
getScope
- Specified by:
getScopein interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
getName
- Specified by:
getNamein interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
getInjectionPoints
- Specified by:
getInjectionPointsin interfacejakarta.enterprise.inject.spi.Bean<T>
-
getBeanClass
- Specified by:
getBeanClassin interfacejakarta.enterprise.inject.spi.Bean<T>
-
getStereotypes
- Specified by:
getStereotypesin interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
isAlternative
public boolean isAlternative()- Specified by:
isAlternativein interfacejakarta.enterprise.inject.spi.BeanAttributes<T>
-
create
- Specified by:
createin interfacejakarta.enterprise.context.spi.Contextual<T>
-
destroy
public void destroy(T instance, jakarta.enterprise.context.spi.CreationalContext<T> tCreationalContext) - Specified by:
destroyin interfacejakarta.enterprise.context.spi.Contextual<T>
-
getId
- Specified by:
getIdin interfacejakarta.enterprise.inject.spi.PassivationCapable
-
equals
If the other object is a SerializableBean too, we compare the 2 underlying wrapped beans. -
hashCode
public int hashCode()We need to return the hashCode of the wrapped underlying bean, otherwise the context won't work.
-