|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 SignalReceiver.registerSignalHandler(SignalHandler)
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 SocketSignalReceiver
and 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.
Method Summary | |
---|---|
Collection<Signal> |
getSupportedSignals()
Get a collection containing the signals supported, by the signal handler. |
void |
init(String params)
Initialise the signal transporter. |
void |
send(Signal signal)
Send a signal. |
Method Detail |
---|
void init(String params)
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 stringCollection<Signal> getSupportedSignals()
void send(Signal signal)
signal
- The signal to send, must not be null
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |