|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.basedb.core.signal.AbstractSignalTransporter
public abstract class AbstractSignalTransporter
Abstract base class that is useful when implementing signal transporters.
Field Summary | |
---|---|
private String |
globalSignalId
|
private static Logger |
logger
Log signals processing. |
private URI |
signalHandlerURI
|
private Collection<Signal> |
signals
|
Constructor Summary | |
---|---|
protected |
AbstractSignalTransporter()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.basedb.core.signal.SignalTransporter |
---|
send |
Field Detail |
---|
private static final Logger logger
private String globalSignalId
private URI signalHandlerURI
private Collection<Signal> signals
Constructor Detail |
---|
protected AbstractSignalTransporter()
Method Detail |
---|
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
AbstractSignalReceiver.processSignalMessage(String)
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()
|
2.17.2: 2011-06-17 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |