public static final class AsyncResponseTransformerListener.NotifyingAsyncResponseTransformer<ResponseT,ResultT> extends Object implements AsyncResponseTransformer<ResponseT,ResultT>
| Modifier and Type | Method and Description |
|---|---|
void |
exceptionOccurred(Throwable error)
Called when an 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<ResultT> |
prepare()
Initial call to enable any setup required before the response is handled.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoBlockingInputStream, toBytes, toFile, toFile, toFile, toFile, toFile, toFile, toPublisherpublic CompletableFuture<ResultT> 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,ResultT>public void onResponse(ResponseT response)
AsyncResponseTransformeronResponse in interface AsyncResponseTransformer<ResponseT,ResultT>response - The unmarshalled response.public void onStream(SdkPublisher<ByteBuffer> publisher)
AsyncResponseTransformeronStream in interface AsyncResponseTransformer<ResponseT,ResultT>publisher - The publisher.public void exceptionOccurred(Throwable error)
AsyncResponseTransformerexceptionOccurred in interface AsyncResponseTransformer<ResponseT,ResultT>error - Error that occurred.Copyright © 2023. All rights reserved.