| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Lifecycle
Lifecycle is one of the Application Component Interfaces, implemented by an application component. Lifecycle is used to notify a component whenever an instance of that component is created or destroyed. The component can use this information to create or initialize resources needed while the component is active.
removeInstance(String) will be called to compensate for a failed application creation.
All application components are required to implement the Lifecycle interface, as well as the DisplayInfo interface.
Method Summary | |
---|---|
ListModel | createInstance(ListModel parameters)
Called when an instance of this component is created. |
ListModel | getCreateParameters()
Called before createInstance(ListModel) to find out what parameters (names, types) this components accepts for the instanctiation. |
void | removeInstance(java.lang.String id)
Called when an instance of this component is destroyed. |
Method Detail |
---|
ListModel createInstance(ListModel parameters) throws ComponentException
The instance identifier that you return from this method is used to identify this component instance according to the fly weight pattern. I.e. whenever the application infrastructure calls any other Application Component Interface methods this id is passed in. For example, you could store any state information for this component instance in a resource that has a unique identifer, and return that identifier as the instance ID for this component. That pattern also implies that no instance variables should be used as there is no defined relation between the Java instances of the implementation class and the component instances in the system. The instance ID can be any string, but it must distinguish this component instance from all other instances of the same component.
Variable.APPLICATION_ID
, must not be null
.
null
.
In portal 6.0.x only the id is used but there is already a list returned
for future extension.
ListModel getCreateParameters()
null
.
If your component does not support
creation time parameters, null
can be returned.void removeInstance(java.lang.String id) throws ComponentException
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |