|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.implementation.DefaultShutDownManager
public class DefaultShutDownManager
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,
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.
To avoid being unable to quit the program, which annoys people, an exception in a ShutDownTask is treated as permission to continue after logging.
| Constructor Summary | |
|---|---|
DefaultShutDownManager()
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultShutDownManager()
| Method Detail |
|---|
public void register(ShutDownTask s)
register in interface ShutDownManagerpublic void deregister(ShutDownTask s)
deregister in interface ShutDownManagerIllegalArgumentException - if task object not currently registeredpublic void shutdown()
shutdown in interface ShutDownManager
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||