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
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
ConstructorDescriptionMutexTransport
(Transport next) MutexTransport
(Transport next, boolean syncOnCommand) -
Method Summary
Modifier and TypeMethodDescriptionasyncRequest
(Object command, ResponseCallback responseCallback) An asynchronous request response where the Receipt will be returned in the future.boolean
void
called to process a commandvoid
A one way asynchronous sendA synchronous request responseA synchronous request responsevoid
setSyncOnCommand
(boolean syncOnCommand) toString()
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
-
Constructor Details
-
MutexTransport
-
MutexTransport
-
-
Method Details
-
onCommand
Description copied from interface:TransportListener
called to process a command- Specified by:
onCommand
in interfaceTransportListener
- Overrides:
onCommand
in classTransportFilter
-
asyncRequest
public FutureResponse asyncRequest(Object command, ResponseCallback responseCallback) throws IOException Description copied from interface:Transport
An 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:
asyncRequest
in interfaceTransport
- Overrides:
asyncRequest
in classTransportFilter
responseCallback
- TODO- Returns:
- the FutureResponse
- Throws:
IOException
-
oneway
Description copied from interface:Transport
A one way asynchronous send- Specified by:
oneway
in interfaceTransport
- Overrides:
oneway
in classTransportFilter
- Throws:
IOException
-
request
Description copied from interface:Transport
A synchronous request response- Specified by:
request
in interfaceTransport
- Overrides:
request
in classTransportFilter
- Returns:
- the response
- Throws:
IOException
-
request
Description copied from interface:Transport
A synchronous request response- Specified by:
request
in interfaceTransport
- Overrides:
request
in classTransportFilter
- Returns:
- the repsonse or null if timeout
- Throws:
IOException
-
toString
- Overrides:
toString
in classTransportFilter
-
isSyncOnCommand
public boolean isSyncOnCommand() -
setSyncOnCommand
public void setSyncOnCommand(boolean syncOnCommand)
-