- All Superinterfaces:
- All Known Implementing Classes:
public interface Component extends SerializableA stateful session component.
A component is instantiate and activated the first time it is requested. It is destroyed when the user session ends.
Stateful components are not necessarily thread safe.
- Bogdan Stefanescu
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
destroy(UserSession session)Destroy this component.
getName()Get the component name if any.
initialize(UserSession session, String name)The component was instantiated by the given session.
isLive()Checks whether this component was initialized and can be used.
void initialize(UserSession session, String name) throws SessionExceptionThe component was instantiated by the given session.
This method should initialize the component. After returning the component will become visible in the session.
void destroy(UserSession session) throws SessionExceptionDestroy this component. This is called by the when the owning session is about to be destroyed. The component should release any allocated resources.
getNameGet the component name if any. A component may be initialized under a name. For singleton components no name is needed so this method might return null.
- the name if any otherwise null
boolean isLive()Checks whether this component was initialized and can be used.