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, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getReceiveCounter, getRemoteAddress, oneway
public TransportSupport()
public TransportListener getTransportListener()
getTransportListener
in interface Transport
public void setTransportListener(TransportListener commandListener)
setTransportListener
in interface Transport
commandListener
- public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
Transport
asyncRequest
in interface Transport
responseCallback
- TODOIOException
public Object request(Object command) throws IOException
Transport
request
in interface Transport
IOException
public Object request(Object command, int timeout) throws IOException
Transport
request
in interface Transport
IOException
public void onException(IOException e)
protected void checkStarted() throws IOException
IOException
public boolean isFaultTolerant()
Transport
isFaultTolerant
in interface Transport
public void reconnect(URI uri) throws IOException
Transport
reconnect
in interface Transport
IOException
- on failure of if not supportedpublic boolean isReconnectSupported()
isReconnectSupported
in interface Transport
public boolean isUpdateURIsSupported()
isUpdateURIsSupported
in interface Transport
public void updateURIs(boolean reblance, URI[] uris) throws IOException
Transport
updateURIs
in interface Transport
IOException
public boolean isDisposed()
isDisposed
in interface Transport
public boolean isConnected()
isConnected
in interface Transport
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.