copyright The Portico Project 2008.

org.portico.core
Class ShutdownHook

java.lang.Object
  extended by 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.


Field Summary
private  RTIExec rtiexec
           
 
Constructor Summary
ShutdownHook(RTIExec rtiexec)
           
 
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
 

Field Detail

rtiexec

private RTIExec rtiexec
Constructor Detail

ShutdownHook

public ShutdownHook(RTIExec rtiexec)
Parameters:
rtiexec - The execution this hook is associated with
Method Detail

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

copyright The Portico Project 2008.