Package org.apache.activemq.transport
Class ResponseCorrelator
java.lang.Object
org.apache.activemq.transport.TransportFilter
org.apache.activemq.transport.ResponseCorrelator
- All Implemented Interfaces:
Service,Transport,TransportListener
- Direct Known Subclasses:
ReliableTransport
Adds the incrementing sequence number to commands along with performing the
correlation of responses to requests to create a blocking request-response
semantics.
-
Field Summary
Fields inherited from class org.apache.activemq.transport.TransportFilter
next, transportListener -
Constructor Summary
ConstructorsConstructorDescriptionResponseCorrelator(Transport next) ResponseCorrelator(Transport next, IntSequenceGenerator sequenceGenerator) -
Method Summary
Modifier and TypeMethodDescriptionasyncRequest(Object o, ResponseCallback responseCallback) An asynchronous request response where the Receipt will be returned in the future.voidcalled to process a commandvoidA one way asynchronous sendvoidonException(IOException error) If an async exception occurs, then assume no responses will arrive for any of current requests.A synchronous request responseA synchronous request responsevoidstop()toString()Methods inherited from class org.apache.activemq.transport.TransportFilter
getNext, getPeerCertificates, getReceiveCounter, getRemoteAddress, getTransportListener, getWireFormat, isConnected, isDisposed, isFaultTolerant, isReconnectSupported, isUpdateURIsSupported, narrow, reconnect, setPeerCertificates, setTransportListener, start, transportInterupted, transportResumed, updateURIs
-
Constructor Details
-
ResponseCorrelator
-
ResponseCorrelator
-
-
Method Details
-
oneway
Description copied from interface:TransportA one way asynchronous send- Specified by:
onewayin interfaceTransport- Overrides:
onewayin classTransportFilter- Throws:
IOException
-
asyncRequest
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
-
request
Description copied from interface:TransportA synchronous request response- Specified by:
requestin interfaceTransport- Overrides:
requestin classTransportFilter- Returns:
- the response
- Throws:
IOException
-
request
Description copied from interface:TransportA synchronous request response- Specified by:
requestin interfaceTransport- Overrides:
requestin classTransportFilter- Returns:
- the repsonse or null if timeout
- Throws:
IOException
-
onCommand
Description copied from interface:TransportListenercalled to process a command- Specified by:
onCommandin interfaceTransportListener- Overrides:
onCommandin classTransportFilter
-
onException
If an async exception occurs, then assume no responses will arrive for any of current requests. Lets let them know of the problem.- Specified by:
onExceptionin interfaceTransportListener- Overrides:
onExceptionin classTransportFilter
-
stop
- Specified by:
stopin interfaceService- Overrides:
stopin classTransportFilter- Throws:
Exception- See Also:
-
getSequenceGenerator
-
toString
- Overrides:
toStringin classTransportFilter
-