ResponseT - Response POJO type.public final class FileAsyncResponseTransformer<ResponseT> extends Object implements AsyncResponseTransformer<ResponseT,ResponseT>
AsyncResponseTransformer that writes the data to the specified file.| Constructor and Description |
|---|
FileAsyncResponseTransformer(Path path) |
| Modifier and Type | Method and Description |
|---|---|
void |
exceptionOccurred(Throwable throwable)
Called when a error is encountered while making the request or receiving the response.
|
void |
onResponse(ResponseT response)
Called when the unmarshalled response object is ready.
|
void |
onStream(SdkPublisher<ByteBuffer> publisher)
Called when the response stream is ready.
|
CompletableFuture<ResponseT> |
prepare()
Initial call to enable any setup required before the response is handled.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoBytes, toFile, toFilepublic FileAsyncResponseTransformer(Path path)
public CompletableFuture<ResponseT> prepare()
AsyncResponseTransformer
Note that this will be called for each request attempt, up to the number of retries allowed by the configured RetryPolicy.
This method is guaranteed to be called before the request is executed, and before AsyncResponseTransformer.onResponse(Object) is
signaled.
prepare in interface AsyncResponseTransformer<ResponseT,ResponseT>public void onResponse(ResponseT response)
AsyncResponseTransformeronResponse in interface AsyncResponseTransformer<ResponseT,ResponseT>response - The unmarshalled response.public void onStream(SdkPublisher<ByteBuffer> publisher)
AsyncResponseTransformeronStream in interface AsyncResponseTransformer<ResponseT,ResponseT>publisher - The publisher.public void exceptionOccurred(Throwable throwable)
AsyncResponseTransformerexceptionOccurred in interface AsyncResponseTransformer<ResponseT,ResponseT>throwable - Error that occurred.Copyright © 2017 Amazon Web Services, Inc. All Rights Reserved.