|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ShutDownManager
Manage tasks to be completed when the
program shuts down normally.
Specifically, allows other object to
register and deregister ShutDownTask objects,
which are invoked in an orderly way when the program is
is commanded to terminate.
Operations:
ShutDownTask in order reverse order of creation,
allowing it to abort the shutdown if needed.
There can only be one instance of this operating, and it is generally obtained via the instance manager.
Items are executed in reverse order to attempt to unwind the creation process. Tasks should not count on this, however, as shutdown can be aborted before a particular task is reached.
Tasks should leave the system in a state that can continue, in case a later task aborts the shutdown.
An instance of this is normally obtained from the instance manager, but using routines should not assume that one is always present; they should check for a null manager and skip operations if needed.
| Method Summary | |
|---|---|
void |
deregister(ShutDownTask s)
Deregister a task object. |
void |
register(ShutDownTask s)
Register a task object for later execution |
void |
shutdown()
Run the shutdown tasks, and then terminate the program if not aborted. |
| Method Detail |
|---|
void register(ShutDownTask s)
void deregister(ShutDownTask s)
IllegalArgumentException - if task object not currently registeredvoid shutdown()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||