|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A component interface to control the lifecycle of the component to which it
belongs. The lifecycle of a component is supposed to be an automaton, whose
states represent execution states of the component. This interface
corresponds to an automaton with two states called STARTED
and STOPPED
, where all the 4 four
possible transitions are allowed. It is however possible to define completely
different lifecycle controller Java interfaces to use completely different
automatons, or to define sub interfaces of this interface to define
automatons based on this one, but with more states and more transitions.
Note: the sub-interfaces of this interface should use the conventions used in this interface, which are the following. The interface contains one method per state in the lifecycle automaton. Each of these methods changes the current state to the state corresponding to its name, if there is a transition from the current state to this state. The interface also contains one field per state. The names and values of these fields correspond to the names of the methods.
Field Summary | |
static String |
STARTED
The state of a component just after startFc has been
executed. |
static String |
STOPPED
The state of a component just after stopFc has been
executed. |
Method Summary | |
String |
getFcState()
Returns the execution state of the component to which this interface belongs. |
void |
startFc()
Starts the component to which this interface belongs. |
void |
stopFc()
Stops the component to which this interface belongs. |
Field Detail |
public static final String STARTED
startFc
has been
executed.
public static final String STOPPED
stopFc
has been
executed. This state is also the initial state of a component, i.e., the
state of a component just after it has been created.
Method Detail |
public String getFcState()
public void startFc() throws IllegalLifeCycleException
IllegalLifeCycleException
- if the transition from the current state
to the STARTED
state is not a valid transition of the
life cycle automaton.public void stopFc() throws IllegalLifeCycleException
IllegalLifeCycleException
- if the transition from the current state
to the STOPPED
state is not a valid transition of the
life cycle automaton.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |