- All Known Implementing Classes:
public interface SignalTransporter
A signal transporter is a class that knows how to send a signal to a specific
SignalReceiver implementation. Implementing classes
must have a public no-argument constructor. Before signals can be sent
with the transporter the
init(String) method is called with the
same string as returned by the
method. This string should contain enough information to let the transporter
send the signal to the correct signal handler on the correct signal receiver.
The format of this string is implementation-specific and needs only to be known
by the coupled transporter and receiver classes. As an example, the
SocketSignalTransporter uses a
URI that contains
the IP number and port of the receiver and an ID for identifying the signal handler.
Signal transporters need not be thread safe since a new instance is created for each signal that is going to be sent.
- Last modified
- $Date: 2008-09-11 22:09:17 +0200 (to, 11 sep 2008) $
initvoid init(String params)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.
params- The initialisation string
getSupportedSignalsGet 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.
- A collections with the signals, or null
sendvoid send(Signal signal)Send a signal.
signal- The signal to send, must not be null