Package org.apache.activemq.transport
Class MutexTransport
- java.lang.Object
-
- org.apache.activemq.transport.TransportFilter
-
- org.apache.activemq.transport.MutexTransport
-
- All Implemented Interfaces:
Service,Transport,TransportListener
public class MutexTransport extends TransportFilter
Thread safe Transport Filter that serializes calls to and from the Transport Stack.
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener
-
-
Constructor Summary
Constructors Constructor Description MutexTransport(Transport next)MutexTransport(Transport next, boolean syncOnCommand)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FutureResponseasyncRequest(Object command, ResponseCallback responseCallback)An asynchronous request response where the Receipt will be returned in the future.booleanisSyncOnCommand()voidonCommand(Object command)called to process a commandvoidoneway(Object command)A one way asynchronous sendObjectrequest(Object command)A synchronous request responseObjectrequest(Object command, int timeout)A synchronous request responsevoidsetSyncOnCommand(boolean syncOnCommand)StringtoString()-
Methods inherited from class org.apache.activemq.transport.TransportFilter
getNext, getPeerCertificates, getReceiveCounter, getRemoteAddress, getTransportListener, getWireFormat, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, onException, reconnect, setPeerCertificates, setTransportListener, start, stop, transportInterupted, transportResumed, updateURIs
-
-
-
-
Method Detail
-
onCommand
public void onCommand(Object command)
Description copied from interface:TransportListenercalled to process a command- Specified by:
onCommandin interfaceTransportListener- Overrides:
onCommandin classTransportFilter
-
asyncRequest
public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException
Description copied from interface:TransportAn asynchronous request response where the Receipt will be returned in the future. If responseCallback is not null, then it will be called when the response has been completed.- Specified by:
asyncRequestin interfaceTransport- Overrides:
asyncRequestin classTransportFilterresponseCallback- TODO- Returns:
- the FutureResponse
- Throws:
IOException
-
oneway
public void oneway(Object command) throws IOException
Description copied from interface:TransportA one way asynchronous send- Specified by:
onewayin interfaceTransport- Overrides:
onewayin classTransportFilter- Throws:
IOException
-
request
public Object request(Object command) throws IOException
Description copied from interface:TransportA synchronous request response- Specified by:
requestin interfaceTransport- Overrides:
requestin classTransportFilter- Returns:
- the response
- Throws:
IOException
-
request
public Object request(Object command, int timeout) throws IOException
Description copied from interface:TransportA synchronous request response- Specified by:
requestin interfaceTransport- Overrides:
requestin classTransportFilter- Returns:
- the repsonse or null if timeout
- Throws:
IOException
-
toString
public String toString()
- Overrides:
toStringin classTransportFilter
-
isSyncOnCommand
public boolean isSyncOnCommand()
-
setSyncOnCommand
public void setSyncOnCommand(boolean syncOnCommand)
-
-