Expose USR1 and USR2 signals to users of AbstractSignalHandler if they bind instances of a
SignalReceiver class for those signals. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5979 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
package com.threerings.presents.server;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.name.Named;
|
||||
|
||||
import static com.threerings.presents.Log.log;
|
||||
|
||||
@@ -72,6 +73,23 @@ public abstract class AbstractSignalHandler
|
||||
log.info(_repmgr.generateReport(ReportManager.DEFAULT_TYPE));
|
||||
}
|
||||
|
||||
protected void usr1Received ()
|
||||
{
|
||||
if (_usr1receiver != null) {
|
||||
_usr1receiver.received();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected void usr2Received ()
|
||||
{
|
||||
if (_usr2receiver != null) {
|
||||
_usr2receiver.received();
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(optional=true) @Named(SignalReceiver.USR1) protected SignalReceiver _usr1receiver;
|
||||
@Inject(optional=true) @Named(SignalReceiver.USR2) protected SignalReceiver _usr2receiver;
|
||||
@Inject protected PresentsServer _server;
|
||||
@Inject protected ReportManager _repmgr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user