Class CrtResponseFileResponseTransformer<ResponseT>
- java.lang.Object
-
- software.amazon.awssdk.services.s3.internal.crt.CrtResponseFileResponseTransformer<ResponseT>
-
- Type Parameters:
ResponseT- Pojo response type.
- All Implemented Interfaces:
AsyncResponseTransformer<ResponseT,ResponseT>
public final class CrtResponseFileResponseTransformer<ResponseT> extends Object implements AsyncResponseTransformer<ResponseT,ResponseT>
When the CRT Response File option is used in a request, the body is streamed directly to the file. The S3CrtResponseHandlerAdapter in this case will never receive a response body but will call onStream when the request is complete with a publisher that will complete immediately. This transformer is effectively a no-op transformer that waits for the stream to complete and then completes the future with the response.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.async.AsyncResponseTransformer
AsyncResponseTransformer.SplitResult<ResponseT extends Object,ResultT extends Object>, AsyncResponseTransformer.TransformerType
-
-
Constructor Summary
Constructors Constructor Description CrtResponseFileResponseTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexceptionOccurred(Throwable throwable)voidonResponse(ResponseT response)voidonStream(SdkPublisher<ByteBuffer> publisher)CompletableFuture<ResponseT>prepare()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.async.AsyncResponseTransformer
name, split, split
-
-
-
-
Method Detail
-
prepare
public CompletableFuture<ResponseT> prepare()
- Specified by:
preparein interfaceAsyncResponseTransformer<ResponseT,ResponseT>
-
onResponse
public void onResponse(ResponseT response)
- Specified by:
onResponsein interfaceAsyncResponseTransformer<ResponseT,ResponseT>
-
onStream
public void onStream(SdkPublisher<ByteBuffer> publisher)
- Specified by:
onStreamin interfaceAsyncResponseTransformer<ResponseT,ResponseT>
-
exceptionOccurred
public void exceptionOccurred(Throwable throwable)
- Specified by:
exceptionOccurredin interfaceAsyncResponseTransformer<ResponseT,ResponseT>
-
-