com.threerings.presents.server
Class AbstractSignalHandler

java.lang.Object
  extended by com.threerings.presents.server.AbstractSignalHandler
Direct Known Subclasses:
SunSignalHandler

public abstract class AbstractSignalHandler
extends Object

A base class that is used to wire up signal handling in one of a couple of possible ways.


Field Summary
protected  ReportManager _repmgr
           
protected  PresentsServer _server
           
protected  SignalReceiver _usr2receiver
           
 
Constructor Summary
AbstractSignalHandler()
           
 
Method Summary
protected  void hupReceived()
          Implementations should call this method when a SIGHUP is received.
 boolean init()
          Initializes this signal handler.
protected  void intReceived()
          Implementations should call this method when a SIGINT is received.
protected abstract  boolean registerHandlers()
          Signal handler implementations should wire themselves up in the call to this method.
protected  void termReceived()
          Implementations should call this method when a SIGTERM is received.
protected  void usr2Received()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_usr2receiver

@Inject(optional=true)
protected SignalReceiver _usr2receiver

_server

@Inject
protected PresentsServer _server

_repmgr

@Inject
protected ReportManager _repmgr
Constructor Detail

AbstractSignalHandler

public AbstractSignalHandler()
Method Detail

init

public boolean init()
Initializes this signal handler.


registerHandlers

protected abstract boolean registerHandlers()
Signal handler implementations should wire themselves up in the call to this method.

Returns:
true if the handlers were successfully wired up, false if they were not able to be wired up.

termReceived

protected void termReceived()
Implementations should call this method when a SIGTERM is received.


intReceived

protected void intReceived()
Implementations should call this method when a SIGINT is received.


hupReceived

protected void hupReceived()
Implementations should call this method when a SIGHUP is received.


usr2Received

protected void usr2Received()