Package io.bytestreams.exchange.core
Interface ClientChannel<REQ,RESP>
- Type Parameters:
REQ- the request message typeRESP- the response message type
- All Superinterfaces:
Channel
- All Known Implementing Classes:
MultiplexedChannel,PipelinedChannel,SymmetricChannel
A
Channel that sends requests and receives correlated responses.-
Method Summary
Modifier and TypeMethodDescriptionSends a message using the channel's configured default timeout and returns a future that completes when a correlated response arrives.Sends a message with a per-request timeout override.
-
Method Details
-
request
Sends a message using the channel's configured default timeout and returns a future that completes when a correlated response arrives.- Parameters:
message- the message to send- Returns:
- a future that completes with the correlated response
- Throws:
DuplicateCorrelationIdException- if the correlation id is already pending
-
request
Sends a message with a per-request timeout override.- Parameters:
message- the message to sendtimeout- the timeout for this request; must be positive- Returns:
- a future that completes with the correlated response
-