| org.cougaar.util.GenericStateModel
All known Subclasses: org.cougaar.util.GenericStateModelAdapter,
GenericStateModel | public interface GenericStateModel (Code) | | GenericStateModel interface.
This is the interface that defines state transitions for
clusters, components and plugins.
|
Method Summary | |
int | getModelState() Return the current state of the object: LOADED, UNLOADED,
ACTIVE, or IDLE. | void | halt() Called object should transition from ACTIVE state
to the LOADED state. | void | initialize() Initialize. | void | load() Object should transition to the LOADED state.
After initialize and before load, an object in notified about its
parents, services, etc. | void | resume() Called object should transition from the IDLE state back to
the ACTIVE state. | void | start() Called object should start any threads it requires. | void | stop() Called object should transition from the IDLE state
to the LOADED state. | void | suspend() Called object should pause operations in such a way that they may
be cleanly resumed or the object can be unloaded. | void | unload() Called object should perform any cleanup operations and transition
to the UNLOADED state. |
ACTIVE | int ACTIVE(Code) | | possibly doing work *
|
IDLE | int IDLE(Code) | | forbidden from doing new work, but may be reactivated *
|
LOADED | int LOADED(Code) | | attached to a parent container *
|
UNINITIALIZED | int UNINITIALIZED(Code) | | UNINITIALIZED state - should never be returned by getModelState() *
|
UNLOADED | int UNLOADED(Code) | | initialized but not yet attached to an enclosing object *
|
getModelState | int getModelState()(Code) | | Return the current state of the object: LOADED, UNLOADED,
ACTIVE, or IDLE.
object state |
load | void load() throws StateModelException(Code) | | Object should transition to the LOADED state.
After initialize and before load, an object in notified about its
parents, services, etc. After load, it should be ready to run (but not
actually running).
exception: org.cougaar.util.StateModelException - Cannot transition to LOADED because initial state wasn't UNLOADED. |
suspend | void suspend() throws StateModelException(Code) | | Called object should pause operations in such a way that they may
be cleanly resumed or the object can be unloaded.
Called object should transition from the ACTIVE state to
the IDLE state.
exception: org.cougaar.util.StateModelException - Cannot transition to IDLE because initial state wasn't ACTIVE. |
|
|