public abstract class TransportSupport extends ServiceSupport implements Transport
| Constructor and Description |
|---|
TransportSupport() |
| Modifier and Type | Method and Description |
|---|---|
FutureResponse |
asyncRequest(Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in
the future.
|
protected void |
checkStarted() |
void |
doConsume(Object command)
Process the inbound command
|
TransportListener |
getTransportListener()
Returns the current transport listener
|
boolean |
isConnected() |
boolean |
isDisposed() |
boolean |
isFaultTolerant()
Indicates if the transport can handle faults
|
boolean |
isReconnectSupported() |
boolean |
isUpdateURIsSupported() |
<T> T |
narrow(Class<T> target)
narrow acceptance
|
void |
onException(IOException e)
Passes any IO exceptions into the transport listener
|
void |
reconnect(URI uri)
reconnect to another location
|
Object |
request(Object command)
A synchronous request response
|
Object |
request(Object command,
int timeout)
A synchronous request response
|
void |
setTransportListener(TransportListener commandListener)
Registers an inbound command listener
|
void |
updateURIs(boolean reblance,
URI[] uris)
Provide a list of available alternative locations
|
addServiceListener, dispose, doStart, doStop, isStarted, isStopped, isStopping, postStop, preStart, removeServiceListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetPeerCertificates, getReceiveCounter, getRemoteAddress, getWireFormat, oneway, setPeerCertificatespublic TransportSupport()
public TransportListener getTransportListener()
getTransportListener in interface Transportpublic void setTransportListener(TransportListener commandListener)
setTransportListener in interface TransportcommandListener - public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
TransportasyncRequest in interface TransportresponseCallback - TODOIOExceptionpublic Object request(Object command) throws IOException
Transportrequest in interface TransportIOExceptionpublic Object request(Object command, int timeout) throws IOException
Transportrequest in interface TransportIOExceptionpublic void onException(IOException e)
protected void checkStarted() throws IOException
IOExceptionpublic boolean isFaultTolerant()
TransportisFaultTolerant in interface Transportpublic void reconnect(URI uri) throws IOException
Transportreconnect in interface TransportIOException - on failure of if not supportedpublic boolean isReconnectSupported()
isReconnectSupported in interface Transportpublic boolean isUpdateURIsSupported()
isUpdateURIsSupported in interface Transportpublic void updateURIs(boolean reblance, URI[] uris) throws IOException
TransportupdateURIs in interface TransportIOExceptionpublic boolean isDisposed()
isDisposed in interface Transportpublic boolean isConnected()
isConnected in interface TransportCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.