|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
An extended LifeCycleController interface. This interface is
used to stop several components simultaneously, in order to avoid the
deadlocks that can occur when several components are stopped one by one
(for example, if a component C is stopped after a component S, and if a
thread T is executing a method m1 in C which calls a method m2 in S, then T
can be blocked in m2 just after S is stopped but before C is stopped, in
which case C can not be stopped, and a deadlock occurs).
| Field Summary |
|---|
| Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
|---|
STARTED, STOPPED |
| Method Summary | |
|---|---|
boolean |
fcActivated(LifeCycleCoordinator component)
Notifies this component that the given component is about to become active. |
void |
fcInactivated(LifeCycleCoordinator component)
Notifies this component that the given component has become inactive. |
boolean |
setFcStarted()
Sets the state of this component, but not of its sub components, to STARTED. |
boolean |
setFcStopped()
Sets the state of this component, but not of its sub components, to STOPPED. |
void |
setFcStopping(LifeCycleCoordinator coordinator)
Sets the state of this component, but not of its sub components, to "STOPPING". |
| Methods inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
|---|
getFcState, startFc, stopFc |
| Method Detail |
public boolean setFcStarted()
throws IllegalLifeCycleException
STARTED. Because of component sharing, the startFc method cannot be implemented by just calling
itself recursively on the sub components of this componets (otherwise some
sub components may be started several times). Hence this method.
STARTED value.
IllegalLifeCycleException - if a problem occurs.
public void setFcStopping(LifeCycleCoordinator coordinator)
throws IllegalLifeCycleException
setFcStopped has not been called, this component must
notify the given coordinator when it becomes inactive, and when it is about
to become active, with the fcInactivated and fcActivated methods.
getFcState method should return STARTED, as the component
is not yet stopped.
coordinator - the coordinator that must be notified when this
component becomes inactive, and when it is about to become active.
IllegalLifeCycleException - if a problem occurs.
public boolean setFcStopped()
throws IllegalLifeCycleException
STOPPED. Because of component sharing, the stopFc method cannot be implemented by just calling
itself recursively on the sub components of this componets (otherwise some
sub components may be stopped several times). Hence this method.
STOPPED value.
IllegalLifeCycleException - if a problem occurs.public boolean fcActivated(LifeCycleCoordinator component)
setFcStopping method has been called.setFcStopped method has not been called yet.
component - the LifeCycleCoordinator interface of a component
that is about to become active.
public void fcInactivated(LifeCycleCoordinator component)
setFcStopping method has been called.setFcStopped method has not been called yet.
component - the LifeCycleCoordinator interface of a component
that has become inactive.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||