Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Action

Description

CREATE

The act of creating and configuring a service which boils down to using an instance of the DirectoryServiceFactory to get a ready to startup instance of the service.

DESTROY

The act of nulling out a reference to an already shutdown service and invoking the garbage collector.

CLEANUP

The act of deleting the working directory associated with a configured instance.

STARTUP

The act of starting a service which is not running.

SHUTDOWN

The act of stopping a service which is running.

TEST

The act of running tests against the directory service.

REVERT

The act of rolling back the server state to a point where the changes made by any tests are reversed.

State Diagram

The following table expose all the different modes and states, with the associated action transitions :

 

NotExistant

StartedPristine

StartedNormal

 

action / next state

action / next state

action : next state

PRISTINE

NotExistant.create / NotExistant
NotExistant.cleanup / NotExistant
NotExistant.startup / StartedPristine
StartedPristine.test

invokeTest
StartedPristine.shutdown / StartedPristine
StartedPristine.cleanup / StartedPristine
StartedPristine.destroy / NonExistant

 

NOSERVICE

 

 

 

ROLLBACK

NotExistant.create / NotExistant
NotExistant.cleanup / NotExistant
NotExistant.startup / StartedPristine
StartedPristine.test

tag
invokeTest / StartedNormal
StartedNormal.revert / StartedNormal

tag
invokeTest / StartedNormal
StartedNormal.revert / StartedNormal

RESTART

NotExistant.create / NotExistant
NotExistant.startup / StartedNormal
StartedNormal.test

 

invokeTest
StartedNormal.shutdown / StartedNormal
StartedNormal.startup / StartedNormal

CUMULATIVE

NotExistant.create / NotExistant
NotExistant.startup / StartedNormal
StartedNormal.test

 

invokeTest

Now let's mix the states and the actions together:

...