T
- Type of result returned in complete()
. May be Void
.SyncResponseHandlerAdapter
, UnmarshallingAsyncResponseHandler
public interface SdkHttpResponseHandler<T>
Modifier and Type | Method | Description |
---|---|---|
T |
complete() |
Called when all parts of the response have been received.
|
void |
exceptionOccurred(Throwable throwable) |
Called when an exception occurs during the request/response.
|
void |
headersReceived(SdkHttpResponse response) |
Called when the initial response with headers is received.
|
void |
onStream(org.reactivestreams.Publisher<ByteBuffer> publisher) |
Called when the HTTP client is ready to start sending data to the response handler.
|
void headersReceived(SdkHttpResponse response)
response
- the SdkHttpResponse
void onStream(org.reactivestreams.Publisher<ByteBuffer> publisher)
Publisher
and request data via a Subscription
as
they can handle it.
If at any time the subscriber wishes to stop receiving data, it may call Subscription.cancel()
. This
will be treated as a failure of the response and the exceptionOccurred(Throwable)
callback will be invoked.
void exceptionOccurred(Throwable throwable)
throwable
- the exception that occurred.T complete()
Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.