org.specrunner
Class SRServices.ShutDown

java.lang.Object
  extended by java.lang.Thread
      extended by org.specrunner.SRServices.ShutDown
All Implemented Interfaces:
Runnable
Enclosing class:
SRServices

public static class SRServices.ShutDown
extends Thread

Shutdown hook thread.

Author:
Thiago Santos.

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
static String SHUTDOWN
          Name of service in shutdown channel.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
SRServices.ShutDown(SRServices shutdown)
          The services instance to shutdown on System.exit(...)
 
Method Summary
static SRServices recover(IChannel channel)
          Return the services instance bound on channel.
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, 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
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SHUTDOWN

public static final String SHUTDOWN
Name of service in shutdown channel.

See Also:
Constant Field Values
Constructor Detail

SRServices.ShutDown

public SRServices.ShutDown(SRServices shutdown)
The services instance to shutdown on System.exit(...).

Parameters:
shutdown - The instance.
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

recover

public static SRServices recover(IChannel channel)
                          throws PipelineException
Return the services instance bound on channel.

Parameters:
channel - The channel.
Returns:
The service instance.
Throws:
PipelineException - On lookup errors.


Copyright © 2014. All rights reserved.