public interface Component extends Serializable
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.
| Modifier and Type | Method and Description |
|---|---|
void |
destroy(UserSession session)
Destroy this component.
|
String |
getName()
Get the component name if any.
|
void |
initialize(UserSession session,
String name)
The component was instantiated by the given session.
|
boolean |
isLive()
Checks whether this component was initialized and can be used.
|
void initialize(UserSession session, String name) throws SessionException
This method should initialize the component. After returning the component will become visible in the session.
session - the user session that created the componentname - the name under this component is registered. Can be null for unnamed component.InvalidStateException - if the component is not in an appropriate life cycle stateSessionException - an internal error occurredvoid destroy(UserSession session) throws SessionException
session - the session owning this componentInvalidStateException - if the component is not in an appropriate life cycle stateSessionException - an internal error occurredString getName()
boolean isLive()
Copyright © 2019 Nuxeo. All rights reserved.