| Modifier and Type | Field and Description |
|---|---|
protected boolean |
async |
protected int |
asyncQueueDepth |
protected AtomicBoolean |
disposed |
protected long |
id |
protected URI |
location |
protected static org.slf4j.Logger |
LOG |
protected boolean |
marshal |
protected VMTransport |
peer |
protected AtomicBoolean |
started |
protected TransportListener |
transportListener |
| Constructor and Description |
|---|
VMTransport(URI location) |
| 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.
|
void |
dispatch(VMTransport transport,
BlockingQueue<Object> pending,
Object command) |
void |
doDispatch(VMTransport transport,
TransportListener transportListener,
Object command) |
int |
getAsyncQueueDepth() |
LinkedBlockingQueue<Object> |
getMessageQueue() |
int |
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport.
|
String |
getRemoteAddress() |
protected TaskRunner |
getTaskRunner() |
TransportListener |
getTransportListener()
Returns the current transport listener
|
boolean |
isAsync() |
boolean |
isConnected() |
boolean |
isDisposed() |
boolean |
isFaultTolerant()
Indicates if the transport can handle faults
|
boolean |
isMarshal() |
boolean |
isReconnectSupported() |
boolean |
isUpdateURIsSupported() |
boolean |
iterate() |
<T> T |
narrow(Class<T> target) |
void |
oneway(Object command)
A one way asynchronous send
|
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 |
setAsync(boolean async) |
void |
setAsyncQueueDepth(int asyncQueueDepth) |
void |
setMarshal(boolean marshal) |
void |
setPeer(VMTransport peer) |
void |
setTransportListener(TransportListener commandListener)
Registers an inbound command listener
|
void |
start() |
void |
stop() |
String |
toString() |
void |
updateURIs(boolean reblance,
URI[] uris)
Provide a list of available alternative locations
|
protected void |
wakeup() |
protected static final org.slf4j.Logger LOG
protected VMTransport peer
protected TransportListener transportListener
protected boolean marshal
protected boolean async
protected int asyncQueueDepth
protected final long id
protected final AtomicBoolean started
protected final AtomicBoolean disposed
public VMTransport(URI location)
public void setPeer(VMTransport peer)
public void oneway(Object command) throws IOException
Transportoneway in interface TransportIOExceptionpublic void dispatch(VMTransport transport, BlockingQueue<Object> pending, Object command)
public void doDispatch(VMTransport transport, TransportListener transportListener, Object command)
protected void wakeup()
public boolean iterate()
iterate in interface TaskTask.iterate()public void setTransportListener(TransportListener commandListener)
TransportsetTransportListener in interface Transportpublic LinkedBlockingQueue<Object> getMessageQueue() throws TransportDisposedIOException
TransportDisposedIOExceptionprotected TaskRunner getTaskRunner() throws TransportDisposedIOException
TransportDisposedIOExceptionpublic 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 TransportListener getTransportListener()
TransportgetTransportListener in interface Transportpublic boolean isMarshal()
public void setMarshal(boolean marshal)
public String getRemoteAddress()
getRemoteAddress in interface Transportpublic boolean isAsync()
public void setAsync(boolean async)
async - the async to setpublic int getAsyncQueueDepth()
public void setAsyncQueueDepth(int asyncQueueDepth)
asyncQueueDepth - the asyncQueueDepth to setpublic boolean isFaultTolerant()
TransportisFaultTolerant in interface Transportpublic boolean isDisposed()
isDisposed in interface Transportpublic boolean isConnected()
isConnected 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 int getReceiveCounter()
TransportgetReceiveCounter in interface TransportCopyright © 2005–2016 The Apache Software Foundation. All rights reserved.