DPML
DPML Metro State
HomeUtilitiesStationMetroDepotTransit
State

The Part API includes the defintion of a state model derived from the OMG Negotiation Services specification. The state model enables the definition of nested state diagrams, transitions, and operation. When a component provider is activated, any associated state model will be initialized rsulting in the firing of initializer transitions. Each initializer may change the activate state of the provider causing additional initializers to fire. On completion of initialization the operation active state is established.

Active State

The active state path is a chain of states commencing with the active state and all enclosing states of the active state.

Management functions available within an active state include:

  • apply any transition declared in the active state path resulting in the modification of the active state
  • exec any operation declared in the active state path
Example State Graph

The following illustration depicts a simple state graph containing two sub-states started and stopped. Initializor transitions establish started as the initial active state under which the stop transition is exposed. Application of the stop transition will result in the establishment of the stopped state as the active state and therefor the exposure of the start and exit transitions within the active state path (and retraction of the stop transition).

Example

The following snipet of code demonstrates the invocation of a management operation named monitor on a service provider (in this example the Monitor interface is a an interface declared by the component within the root state).

Provider provider = component.getProvider();
Monitor monitor = (Monitor) provider.exec( "monitor", new Object[0] );
int count = monitor.getAccessCount() );

The following snipet is a hyperthetical example of how a management application could stop a service, apply a parameter, and resume service execution.

Provider provider = component.getProvider();
provider.apply( "stop" ); // invoke transition
provider.exec( "timeout", new Object[]{"3000"} ); // execute operation
provider.apply( "start" ); // invoke transition