Class FilterTransformingAsyncHttpResponseHandler<ResultT>
- java.lang.Object
-
- software.amazon.awssdk.core.internal.http.async.FilterTransformingAsyncHttpResponseHandler<ResultT>
-
- All Implemented Interfaces:
TransformingAsyncResponseHandler<ResultT>
,SdkAsyncHttpResponseHandler
public abstract class FilterTransformingAsyncHttpResponseHandler<ResultT> extends Object implements TransformingAsyncResponseHandler<ResultT>
Decorator class that simply delegates to the wrappedTransformingAsyncResponseHandler
. Useful for intercepting the desired callback(s) before passing them on to the delegate.
-
-
Constructor Summary
Constructors Constructor Description FilterTransformingAsyncHttpResponseHandler(TransformingAsyncResponseHandler<ResultT> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onError(Throwable error)
void
onHeaders(SdkHttpResponse headers)
void
onStream(org.reactivestreams.Publisher<ByteBuffer> stream)
CompletableFuture<ResultT>
prepare()
Return the future holding the transformed response.
-
-
-
Constructor Detail
-
FilterTransformingAsyncHttpResponseHandler
public FilterTransformingAsyncHttpResponseHandler(TransformingAsyncResponseHandler<ResultT> delegate)
-
-
Method Detail
-
prepare
public CompletableFuture<ResultT> 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<ResultT>
- Returns:
- The future holding the transformed response.
-
onHeaders
public void onHeaders(SdkHttpResponse headers)
- Specified by:
onHeaders
in interfaceSdkAsyncHttpResponseHandler
-
onStream
public void onStream(org.reactivestreams.Publisher<ByteBuffer> stream)
- Specified by:
onStream
in interfaceSdkAsyncHttpResponseHandler
-
onError
public void onError(Throwable error)
- Specified by:
onError
in interfaceSdkAsyncHttpResponseHandler
-
-