openr66.protocol.utils
Class OpenR66SignalHandler

java.lang.Object
  extended by openr66.protocol.utils.OpenR66SignalHandler
All Implemented Interfaces:
sun.misc.SignalHandler

public class OpenR66SignalHandler
extends Object
implements sun.misc.SignalHandler

Signal Handler to allow trapping signals.

Author:
Frederic Bregier

Nested Class Summary
static class OpenR66SignalHandler.R66TimerTask
          Finalize resources attached to handlers
 
Field Summary
 
Fields inherited from interface sun.misc.SignalHandler
SIG_DFL, SIG_IGN
 
Constructor Summary
OpenR66SignalHandler()
           
 
Method Summary
 void handle(sun.misc.Signal signal)
          Handle signal
static void initSignalHandler()
          Function to initialized the SignalHandler
static boolean isInShutdown()
          Says if the Process is currently in shutdown
static void launchFinalExit()
           
static void printStackTrace(Thread thread, StackTraceElement[] stacks)
          Print stack trace
static void terminate(boolean immediateSet)
          This function is the top function to be called when the process is to be shutdown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenR66SignalHandler

public OpenR66SignalHandler()
Method Detail

isInShutdown

public static boolean isInShutdown()
Says if the Process is currently in shutdown

Returns:
True if already in shutdown

terminate

public static void terminate(boolean immediateSet)
This function is the top function to be called when the process is to be shutdown.

Parameters:
immediateSet -

printStackTrace

public static void printStackTrace(Thread thread,
                                   StackTraceElement[] stacks)
Print stack trace

Parameters:
thread -
stacks -

launchFinalExit

public static void launchFinalExit()

initSignalHandler

public static void initSignalHandler()
Function to initialized the SignalHandler


handle

public void handle(sun.misc.Signal signal)
Handle signal

Specified by:
handle in interface sun.misc.SignalHandler
Parameters:
signal -


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.