net.sourceforge.geeboss.controller.thread
Class ShutdownHook

java.lang.Object
  extended by java.lang.Thread
      extended by net.sourceforge.geeboss.controller.thread.ShutdownHook
All Implemented Interfaces:
java.lang.Runnable

public class ShutdownHook
extends java.lang.Thread

This Thread will exit Geeboss in a clean way in case the virtual machine is terminated in response to a user interrupt, such as typing ^C, or a system-wide event, such as user logoff or system shutdown. A clean shutdown in this case is saving data to the user directory on exit.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ShutdownHook(MainView gui)
          Instantiate a new ShutdownHook which will be added to the Runtime with calling addShutdownHook().
 
Method Summary
 void run()
          Call the shutDown() Method of the Maincontroller in the Main Thread
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ShutdownHook

public ShutdownHook(MainView gui)
Instantiate a new ShutdownHook which will be added to the Runtime with calling addShutdownHook().

Parameters:
gui - The MainView
Method Detail

run

public void run()
Call the shutDown() Method of the Maincontroller in the Main Thread

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()


Copyright (c) 2005 The Geeboss team (http://geeboss.sourceforge.net). All Rights Reserved.