@FunctionalInterface public interface IncomingRequestAwareClient
Request
.
This client interface is meant to be used by modules that decorate the client. Application code
will always only see the plain Client
that then either is scoped or unscoped.
See ClientDecorator
Modifier and Type | Method and Description |
---|---|
default Client |
asUnawareClient() |
CompletionStage<Response<okio.ByteString>> |
send(Request request,
Optional<Request> incoming)
Send a Request with an optional originating Request and get an asynchronous Response as a
CompletionStage.
|
default Client |
wrapRequest(Request request)
Wraps a request and returns a
Client where all calles use the wrapped request for the
incoming argument. |
CompletionStage<Response<okio.ByteString>> send(Request request, Optional<Request> incoming)
request
- the request to sendincoming
- optional originating request that created this requestResponse
,
or completes exceptionally if there is a failure sending the request.
An error status code returned by the service is a normal completion.default Client asUnawareClient()
Client
that which makes all calls to send(Request, Optional)
with an Optional.empty()
second incoming request argument.Copyright © 2016. All rights reserved.