|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.fractal.julia.control.lifecycle.OptimizedLifeCycleControllerMixin
Provides an optimized implementation of the LifeCycleController
interface. This
implementation does not need interceptors. This life cycle controller
works by stopping all the direct and indirect primitive sub components that
have a LifeCycleCoordinator
interface, and the primitive client
components of these components (these clients must also have a LifeCycleCoordinator
interface). These components are stopped
simultaneously, by using the coordinator interface provided by this
component.
Requirements
Field Summary | |
Component |
_this_weaveableC
The weaveableC field required by this mixin. |
boolean |
fcStarted
Indicates if this component is started or not. |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Method Summary | |
abstract void |
_this_setFcState(boolean started)
The setFcState method required by this mixin. |
abstract void |
_this_stopFc(LifeCycleCoordinator[] components)
The stopFc method required by this mixin. |
Set |
getFcInternalLifeCycleControllers()
|
LifeCycleCoordinator[] |
getFcLifeCycleControllers(Component id)
Returns the components that must be stopped in order to stop the given component. |
String |
getFcState()
Returns the execution state of the component to which this interface belongs. |
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". |
void |
startFc()
Starts the component to which this interface belongs. |
void |
stopFc()
Stops the component to which this interface belongs. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator |
fcActivated, fcInactivated |
Field Detail |
public boolean fcStarted
public Component _this_weaveableC
Component
interface of the component to
which this controller object belongs.
Method Detail |
public String getFcState()
LifeCycleController
getFcState
in interface LifeCycleController
public void startFc() throws IllegalLifeCycleException
LifeCycleController
startFc
in interface LifeCycleController
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
LifeCycleController
stopFc
in interface LifeCycleController
IllegalLifeCycleException
- if the transition from the current state
to the STOPPED
state is not a valid transition of the
life cycle automaton.public boolean setFcStarted()
LifeCycleCoordinator
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.
setFcStarted
in interface LifeCycleCoordinator
STARTED
value.public void setFcStopping(LifeCycleCoordinator coordinator) throws IllegalLifeCycleException
LifeCycleCoordinator
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.
setFcStopping
in interface LifeCycleCoordinator
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()
LifeCycleCoordinator
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.
setFcStopped
in interface LifeCycleCoordinator
STOPPED
value.public LifeCycleCoordinator[] getFcLifeCycleControllers(Component id) throws IllegalLifeCycleException
LifeCycleCoordinator
interface, as well as the primitive client components of these components.
id
- a composite component.
IllegalLifeCycleException
- if a problem occurs.public Set getFcInternalLifeCycleControllers() throws IllegalLifeCycleException
IllegalLifeCycleException
public abstract void _this_setFcState(boolean started) throws IllegalLifeCycleException
setFcState
method.
IllegalLifeCycleException
public abstract void _this_stopFc(LifeCycleCoordinator[] components) throws IllegalLifeCycleException
stopFc
method.
IllegalLifeCycleException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |