|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LifeCycleController
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 java.lang.String |
STARTED
The state of a component just after startFc has been
executed. |
static java.lang.String |
STOPPED
The state of a component just after stopFc has been
executed. |
Method Summary | |
---|---|
java.lang.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 |
---|
static final java.lang.String STARTED
startFc
has been
executed.
static final java.lang.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 |
---|
java.lang.String getFcState()
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.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 |