Class AsyncAfterTransmissionInterceptorCallingResponseHandler<T>
java.lang.Object
software.amazon.awssdk.core.internal.http.async.AsyncAfterTransmissionInterceptorCallingResponseHandler<T>
- Type Parameters:
T
- the type of the result
- All Implemented Interfaces:
TransformingAsyncResponseHandler<T>
,SdkAsyncHttpResponseHandler
public final class AsyncAfterTransmissionInterceptorCallingResponseHandler<T>
extends Object
implements TransformingAsyncResponseHandler<T>
Async response handler decorator to run interceptors after response is received.
-
Constructor Summary
ConstructorDescriptionAsyncAfterTransmissionInterceptorCallingResponseHandler
(TransformingAsyncResponseHandler<T> delegate, ExecutionContext context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Called when there is an error making the request or receiving the response.void
onHeaders
(SdkHttpResponse response) Called when the headers have been received.void
onStream
(org.reactivestreams.Publisher<ByteBuffer> publisher) Called when the streaming body is ready.prepare()
Return the future holding the transformed response.
-
Constructor Details
-
AsyncAfterTransmissionInterceptorCallingResponseHandler
public AsyncAfterTransmissionInterceptorCallingResponseHandler(TransformingAsyncResponseHandler<T> delegate, ExecutionContext context)
-
-
Method Details
-
onHeaders
Description copied from interface:SdkAsyncHttpResponseHandler
Called when the headers have been received.- Specified by:
onHeaders
in interfaceSdkAsyncHttpResponseHandler
- Parameters:
response
- The headers.
-
onError
Description copied from interface:SdkAsyncHttpResponseHandler
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
.- Specified by:
onError
in interfaceSdkAsyncHttpResponseHandler
- Parameters:
error
- The error.
-
onStream
Description copied from interface:SdkAsyncHttpResponseHandler
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.
- Specified by:
onStream
in interfaceSdkAsyncHttpResponseHandler
- Parameters:
publisher
- The streaming body.
-
prepare
Description copied from interface:TransformingAsyncResponseHandler
Return the future holding the transformed response.This method is guaranteed to be called before the request is executed, and before
SdkAsyncHttpResponseHandler.onHeaders(software.amazon.awssdk.http.SdkHttpResponse)
is signaled.- Specified by:
prepare
in interfaceTransformingAsyncResponseHandler<T>
- Returns:
- The future holding the transformed response.
-