SalesPoint Framework v3.0

Hook: Change Shutdown Conditions


Requirement

Different or additional conditions have to be imposed on application shutdown.

Method of Adaptation
Augment feature
Level of Support
Parameter Pattern  
HotSpot
Shutdown
Hooks used
Incorporate new Shop
Participants
Shop, NewShop

Changes

  1. subclass NewShop of Shop.
  2. NewShop.canShutDown overrides Shop.canShutDown :
    1. Remember shop state at start of method.
    2. synchronisation ( Shop.canShutDown , evaluation of additional conditions).
    3. if Shop.canShutDown returns false :
      1. immediately return false .
    4. if shutdown cannot be allowed due to the additional conditions:
      1. if shop state at beginning of method was RUNNING :
        1. call Shop.resume .
      2. return false .
    5. return true .
  3. Incorporate new Shop [NewShop = NewShop].

Constraints


SalesPoint Framework v3.0