org.portico.core
Class ShutdownHook
java.lang.Object
org.portico.core.ShutdownHook
- All Implemented Interfaces:
- Runnable
public class ShutdownHook
- extends Object
- implements Runnable
Instances of this class should be registered as shutdown hooks so that when an execution
exists, the active RTI executions can be shutdown.
See here and
here for a
description of the shutdown hook mechanism.
Method Summary |
void |
run()
If the RTIExec associated with the shutdown hook is currently running, it will
ask it to shutdown. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rtiexec
private RTIExec rtiexec
ShutdownHook
public ShutdownHook(RTIExec rtiexec)
- Parameters:
rtiexec
- The execution this hook is associated with
run
public void run()
- If the
RTIExec
associated with the shutdown hook is currently running, it will
ask it to shutdown. This should only ever be called when the JVM is stopped abruptly
(but is not crashing). The obviously situation is when Ctrl-C is pressed.
- Specified by:
run
in interface Runnable