|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.activemq.util.ServiceSupport
org.apache.activemq.transport.TransportSupport
public abstract class TransportSupport
A useful base class for transport implementations.
Constructor Summary | |
---|---|
TransportSupport()
|
Method Summary | ||
---|---|---|
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 |
|
|
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 |
Methods inherited from class org.apache.activemq.util.ServiceSupport |
---|
addServiceListener, dispose, doStart, doStop, isStarted, isStopped, isStopping, removeServiceListener, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.activemq.transport.Transport |
---|
getReceiveCounter, getRemoteAddress, oneway |
Methods inherited from interface org.apache.activemq.Service |
---|
start, stop |
Constructor Detail |
---|
public TransportSupport()
Method Detail |
---|
public TransportListener getTransportListener()
getTransportListener
in interface Transport
public void setTransportListener(TransportListener commandListener)
setTransportListener
in interface Transport
commandListener
- public <T> T narrow(Class<T> target)
narrow
in interface Transport
target
-
public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
Transport
asyncRequest
in interface Transport
responseCallback
- TODO
IOException
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 doConsume(Object command)
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 isDisposed()
isDisposed
in interface Transport
public boolean isConnected()
isConnected
in interface Transport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |