public abstract class AbstractSignalTransporter extends Object implements SignalTransporter
Modifier and Type | Field and Description |
---|---|
private String |
globalSignalId |
private static org.slf4j.Logger |
logger
Log signals processing.
|
private URI |
signalHandlerURI |
private Collection<Signal> |
signals |
Modifier | Constructor and Description |
---|---|
protected |
AbstractSignalTransporter() |
Modifier and Type | Method and Description |
---|---|
protected String |
generateSignalMessage(Signal signal)
Generate a signal message string for the given signal.
|
protected String |
getGlobalSignalId()
Get the raw ID string that was passed to the
init(String)
method. |
protected String |
getHandlerId()
Get the local handler ID part of the signal URI.
|
protected String |
getReceiverId()
Get the receiverId part of the signal URI.
|
protected URI |
getSignalURI()
Get the URI representation of the global signal ID.
|
Collection<Signal> |
getSupportedSignals()
Get a collection containing the signals supported, by the signal
handler.
|
void |
init(String params)
Initialise the transporter.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
send
private static final org.slf4j.Logger logger
private String globalSignalId
private URI signalHandlerURI
private Collection<Signal> signals
public void init(String params)
AbstractSignalReceiver.getGlobalSignalId(SignalHandler)
.
If the receiver subclass overrided that method, the corresponding transporter
subclass should override this method.init
in interface SignalTransporter
params
- The initialisation stringfor a description of the format expected
public Collection<Signal> getSupportedSignals()
SignalTransporter
getSupportedSignals
in interface SignalTransporter
protected String generateSignalMessage(Signal signal)
signal://handlerId@receiverId/?signal
protected String getGlobalSignalId()
init(String)
method.protected URI getSignalURI()
SignalException
- If the signal ID is not a valid URI.protected String getReceiverId()
protected String getHandlerId()