openlsd.network.client.common
Class LSDSignalHandler

java.lang.Object
  extended by openlsd.network.client.common.LSDSignalHandler
All Implemented Interfaces:
sun.misc.SignalHandler

public class LSDSignalHandler
extends java.lang.Object
implements sun.misc.SignalHandler

Class for the Signal Handler that shutdown the connection and socket before exit

Author:
Frederic BREGIER LGPL 2007

Field Summary
 
Fields inherited from interface sun.misc.SignalHandler
SIG_DFL, SIG_IGN
 
Constructor Summary
LSDSignalHandler()
           
 
Method Summary
static void addConnection(java.sql.Connection conn)
          Add a Connection into the list
static void addIoSession(org.apache.mina.common.IoSession ioSession)
          Add an IoSession into the list
 void handle(sun.misc.Signal signal)
          Handle signal
static void initSignalHandler()
          Function to initialized the SignalHandler
static void removeConnection(java.sql.Connection conn)
          Remove a Connection from the list
static void removeIoSession(org.apache.mina.common.IoSession ioSession)
          Remove an IoSession from the list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LSDSignalHandler

public LSDSignalHandler()
Method Detail

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 -

addIoSession

public static void addIoSession(org.apache.mina.common.IoSession ioSession)
Add an IoSession into the list

Parameters:
ioSession -

removeIoSession

public static void removeIoSession(org.apache.mina.common.IoSession ioSession)
Remove an IoSession from the list

Parameters:
ioSession -

addConnection

public static void addConnection(java.sql.Connection conn)
Add a Connection into the list

Parameters:
conn -

removeConnection

public static void removeConnection(java.sql.Connection conn)
Remove a Connection from the list

Parameters:
conn -