Interface SdkAsyncHttpResponseHandler
- All Known Subinterfaces:
TransformingAsyncResponseHandler<ResultT>
- All Known Implementing Classes:
AsyncAfterTransmissionInterceptorCallingResponseHandler
,AsyncResponseHandler
,AsyncStreamingResponseHandler
,CombinedResponseAsyncHttpResponseHandler
,FilterTransformingAsyncHttpResponseHandler
,IdempotentAsyncResponseHandler
public interface SdkAsyncHttpResponseHandler
Handles asynchronous HTTP responses.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when there is an error making the request or receiving the response.void
onHeaders
(SdkHttpResponse headers) Called when the headers have been received.void
onStream
(org.reactivestreams.Publisher<ByteBuffer> stream) Called when the streaming body is ready.
-
Method Details
-
onHeaders
Called when the headers have been received.- Parameters:
headers
- The headers.
-
onStream
Called when the streaming body is ready.This method is always called. If the response does not have a body, then the publisher will complete the subscription without signalling any elements.
- Parameters:
stream
- The streaming body.
-
onError
Called when there is an error making the request or receiving the response. If the error is encountered while streaming the body, then the error is also delivered to theSubscriber
.- Parameters:
error
- The error.
-