org.objectweb.easybeans.server
Class EasyBeans.ShutdownHook

java.lang.Object
  extended by java.lang.Thread
      extended by org.objectweb.easybeans.server.EasyBeans.ShutdownHook
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
EasyBeans

static class EasyBeans.ShutdownHook
extends java.lang.Thread

Hook that is called when process is going to shutdown.

Author:
Florent Benoit

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  Embedded embedded
          Reference to the embedded object.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
EasyBeans.ShutdownHook(Embedded embedded)
          Build a new shutdown hook with the given embedded instance.
 
Method Summary
 void run()
          Stop the embedded server.
 
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
 

Field Detail

embedded

private Embedded embedded
Reference to the embedded object.

Constructor Detail

EasyBeans.ShutdownHook

public EasyBeans.ShutdownHook(Embedded embedded)
Build a new shutdown hook with the given embedded instance.

Parameters:
embedded - the instance to stop
Method Detail

run

public void run()
Stop the embedded server.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread