|
||||||||||
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(java.lang.Object command,
ResponseCallback responseCallback)
An asynchronous request response where the Receipt will be returned in the future. |
protected void |
checkStarted()
|
void |
doConsume(java.lang.Object command)
Process the inbound command |
TransportListener |
getTransportListener()
Returns the current transport listener |
java.lang.Object |
narrow(java.lang.Class target)
narrow acceptance |
void |
onException(java.io.IOException e)
Passes any IO exceptions into the transport listener |
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 commandListener)
Registers an inbound command listener |
Methods inherited from class org.apache.activemq.util.ServiceSupport |
---|
dispose, doStart, doStop, isStarted, isStopped, isStopping, 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 |
---|
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 java.lang.Object narrow(java.lang.Class target)
narrow
in interface Transport
target
-
public FutureResponse asyncRequest(java.lang.Object command, ResponseCallback responseCallback) throws java.io.IOException
Transport
asyncRequest
in interface Transport
responseCallback
- TODO
java.io.IOException
public java.lang.Object request(java.lang.Object command) throws java.io.IOException
Transport
request
in interface Transport
java.io.IOException
public java.lang.Object request(java.lang.Object command, int timeout) throws java.io.IOException
Transport
request
in interface Transport
java.io.IOException
public void doConsume(java.lang.Object command)
public void onException(java.io.IOException e)
protected void checkStarted() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |