public class TransportFilter extends java.lang.Object implements TransportListener, Transport
| Modifier and Type | Field and Description |
|---|---|
protected Transport |
next |
protected TransportListener |
transportListener |
| Constructor and Description |
|---|
TransportFilter(Transport next) |
| Modifier and Type | Method and Description |
|---|---|
FutureResponse |
asyncRequest(java.lang.Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in
the future.
|
Transport |
getNext() |
int |
getReceiveCounter()
Returns a counter which gets incremented as data is read from the transport.
|
java.lang.String |
getRemoteAddress() |
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(java.lang.Class<T> target) |
void |
onCommand(java.lang.Object command)
called to process a command
|
void |
oneway(java.lang.Object command)
A one way asynchronous send
|
void |
onException(java.io.IOException error)
An unrecoverable exception has occured on the transport
|
void |
reconnect(java.net.URI uri)
reconnect to another location
|
java.lang.Object |
request(java.lang.Object command)
A synchronous request response
|
java.lang.Object |
request(java.lang.Object command,
int timeout)
A synchronous request response
|
void |
setTransportListener(TransportListener channelListener)
Registers an inbound command listener
|
void |
start() |
void |
stop() |
java.lang.String |
toString() |
void |
transportInterupted()
The transport has suffered an interuption from which it hopes to recover
|
void |
transportResumed()
The transport has resumed after an interuption
|
void |
updateURIs(boolean rebalance,
java.net.URI[] uris)
Provide a list of available alternative locations
|
protected TransportListener transportListener
public TransportFilter(Transport next)
public TransportListener getTransportListener()
TransportgetTransportListener in interface Transportpublic void setTransportListener(TransportListener channelListener)
TransportsetTransportListener in interface Transportpublic void start() throws java.lang.Exception
start in interface Servicejava.io.IOException - if the next channel has not been set.java.lang.ExceptionService.start()public void stop() throws java.lang.Exception
stop in interface Servicejava.lang.ExceptionService.stop()public void onCommand(java.lang.Object command)
TransportListeneronCommand in interface TransportListenerpublic java.lang.String toString()
toString in class java.lang.Objectpublic void oneway(java.lang.Object command) throws java.io.IOException
Transportpublic FutureResponse asyncRequest(java.lang.Object command, ResponseCallback responseCallback) throws java.io.IOException
TransportasyncRequest in interface TransportresponseCallback - TODOjava.io.IOExceptionpublic java.lang.Object request(java.lang.Object command) throws java.io.IOException
Transportpublic java.lang.Object request(java.lang.Object command, int timeout) throws java.io.IOException
Transportpublic void onException(java.io.IOException error)
TransportListeneronException in interface TransportListenerpublic void transportInterupted()
TransportListenertransportInterupted in interface TransportListenerpublic void transportResumed()
TransportListenertransportResumed in interface TransportListenerpublic <T> T narrow(java.lang.Class<T> target)
public java.lang.String getRemoteAddress()
getRemoteAddress in interface Transportpublic boolean isFaultTolerant()
TransportisFaultTolerant in interface TransportTransport.isFaultTolerant()public boolean isDisposed()
isDisposed in interface Transportpublic boolean isConnected()
isConnected in interface Transportpublic void reconnect(java.net.URI uri) throws java.io.IOException
Transportpublic int getReceiveCounter()
TransportgetReceiveCounter in interface Transportpublic boolean isReconnectSupported()
isReconnectSupported in interface Transportpublic boolean isUpdateURIsSupported()
isUpdateURIsSupported in interface Transportpublic void updateURIs(boolean rebalance, java.net.URI[] uris) throws java.io.IOException
TransportupdateURIs in interface Transportjava.io.IOExceptionCopyright © 2005-2012. All Rights Reserved.