public abstract class AbstractTransport<C> extends java.lang.Object implements Transport
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<TransportStopListener> |
stopListeners |
| Constructor and Description |
|---|
AbstractTransport() |
AbstractTransport(C context) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStopListener(TransportStopListener listener)
Register a stop listener for this transport
|
C |
getContext()
The generic context object for this transport (actual type of the context depends on the
Platform) |
TransportStatusHandler |
getStatusHandler()
Get the status handler for this transport
|
boolean |
isDisconnectAfterAuthenticationFailure()
Indicates to the calling Channel that the transport should be closed after an authentication failure
|
boolean |
removeStopListener(TransportStopListener listener)
Unregister a stop listener for this transport
|
void |
setContext(java.lang.Object context)
Set the current context for this transport (usually depends on the
Platform) |
void |
setStatusHandler(TransportStatusHandler statusHandler)
Attach a status handler that will be notified of network activity and errors
|
void |
stop()
Stop the transport and stop any communication on the network
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisReconnectAfterReceive, isStarted, send, startprotected final java.util.List<TransportStopListener> stopListeners
public AbstractTransport()
public AbstractTransport(C context)
public void setContext(java.lang.Object context)
TransportPlatform)setContext in interface Transportcontext - current contextpublic C getContext()
TransportPlatform)getContext in interface Transportpublic boolean isDisconnectAfterAuthenticationFailure()
TransportisDisconnectAfterAuthenticationFailure in interface Transportpublic void setStatusHandler(TransportStatusHandler statusHandler)
TransportsetStatusHandler in interface TransportstatusHandler - status handlerTransportStatusHandlerpublic TransportStatusHandler getStatusHandler()
TransportgetStatusHandler in interface TransportTransportStatusHandlerpublic void addStopListener(TransportStopListener listener)
TransportaddStopListener in interface Transportlistener - stop listenerTransportStopListenerpublic boolean removeStopListener(TransportStopListener listener)
TransportremoveStopListener in interface Transportlistener - stop listenerTransportStopListener