edu.washington.cs.rfid.util
Class RFIDSignalHandler

java.lang.Object
  extended by edu.washington.cs.rfid.util.RFIDSignalHandler
All Implemented Interfaces:
sun.misc.SignalHandler

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

An abstract class for custom handling OS signals SIGINT, SIGTERM, and SIGHUP.

Author:
Evan

Field Summary
 
Fields inherited from interface sun.misc.SignalHandler
SIG_DFL, SIG_IGN
 
Constructor Summary
RFIDSignalHandler()
          Creates a new RFIDSignalHandler.
 
Method Summary
 void addListener(RFIDSignalListener l)
          Adds a new RFIDSignalListener to the list of listeners.
 void handle(sun.misc.Signal s)
          The handle method from the SignalHandler interface.
 boolean registerSignal(java.lang.String s)
          Registers an OS signal for handling by this RFIDSignalHandler.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RFIDSignalHandler

public RFIDSignalHandler()
Creates a new RFIDSignalHandler.

Method Detail

addListener

public void addListener(RFIDSignalListener l)
Adds a new RFIDSignalListener to the list of listeners.

Parameters:
l - The RFIDSignalListener to add

registerSignal

public boolean registerSignal(java.lang.String s)
Registers an OS signal for handling by this RFIDSignalHandler.

Parameters:
s - The name of the signal to handle
Returns:
True if the registration succeeded, false o/w

handle

public void handle(sun.misc.Signal s)
The handle method from the SignalHandler interface.

Specified by:
handle in interface sun.misc.SignalHandler
Parameters:
The - Signal to handle.