2.17.2: 2011-06-17

net.sf.basedb.core
Class Job.JobSignalTransporter

java.lang.Object
  extended by net.sf.basedb.core.Job.JobSignalTransporter
All Implemented Interfaces:
SignalTransporter
Enclosing class:
Job

private class Job.JobSignalTransporter
extends Object
implements SignalTransporter

Wrapper for the signal transporter that intercepts the ABORT signal and changes the job's status to ABORTING. The ABORT signal is dealyed until after a successful commit.

Since:
2.6

Field Summary
private  Signal delayed
           
private  SignalTransporter transporter
           
 
Constructor Summary
private Job.JobSignalTransporter(SignalTransporter transporter)
           
 
Method Summary
 Collection<Signal> getSupportedSignals()
          Get a collection containing the signals supported, by the signal handler.
 void init(String params)
          Initialise the signal transporter.
(package private)  void onAfterCommit()
           
 void send(Signal signal)
          Send a signal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transporter

private final SignalTransporter transporter

delayed

private Signal delayed
Constructor Detail

Job.JobSignalTransporter

private Job.JobSignalTransporter(SignalTransporter transporter)
Method Detail

getSupportedSignals

public Collection<Signal> getSupportedSignals()
Description copied from interface: SignalTransporter
Get a collection containing the signals supported, by the signal handler. A null return value means that the transporter just doesn't know about which signals are supported and which are not.

Specified by:
getSupportedSignals in interface SignalTransporter
Returns:
A collections with the signals, or null

init

public void init(String params)
Description copied from interface: SignalTransporter
Initialise the signal transporter. The parameter is the same as returned by SignalReceiver.registerSignalHandler(SignalHandler) and should contain information that the transporter can parse and use for contacting the correct signal receiver and to send signals to the registered signal handler.

Specified by:
init in interface SignalTransporter
Parameters:
params - The initialisation string

send

public void send(Signal signal)
Description copied from interface: SignalTransporter
Send a signal.

Specified by:
send in interface SignalTransporter
Parameters:
signal - The signal to send, must not be null

onAfterCommit

void onAfterCommit()

2.17.2: 2011-06-17