|
||||||||||
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 |
Object |
narrow(Class target)
narrow acceptance |
void |
onException(IOException e)
Passes any IO exceptions into the transport listener |
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 |
---|
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 Object narrow(Class 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |