ResponseT - Initial response type of event stream operation.EventT - Base type of event stream message frames.public final class EventStreamAsyncResponseTransformer<ResponseT,EventT> extends Object implements AsyncResponseTransformer<SdkResponse,Void>
AsyncResponseTransformer to decode event stream messages and deliver them to the
subscriber.| Modifier and Type | Class and Description |
|---|---|
static class |
EventStreamAsyncResponseTransformer.Builder<ResponseT,EventT>
Builder for
EventStreamAsyncResponseTransformer. |
AsyncResponseTransformer.SplitResult<ResponseT,ResultT>| Modifier and Type | Method and Description |
|---|---|
static <ResponseT,EventT> |
builder()
Creates a
EventStreamAsyncResponseTransformer.Builder used to create EventStreamAsyncResponseTransformer. |
void |
exceptionOccurred(Throwable throwable)
Called when an error is encountered while making the request or receiving the response.
|
void |
onResponse(SdkResponse response)
Called when the unmarshalled response object is ready.
|
void |
onStream(SdkPublisher<ByteBuffer> publisher)
Called when the response stream is ready.
|
CompletableFuture<Void> |
prepare()
Initial call to enable any setup required before the response is handled.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsplit, split, toBlockingInputStream, toBytes, toFile, toFile, toFile, toFile, toFile, toFile, toPublisherpublic static <ResponseT,EventT> EventStreamAsyncResponseTransformer.Builder<ResponseT,EventT> builder()
EventStreamAsyncResponseTransformer.Builder used to create EventStreamAsyncResponseTransformer.ResponseT - Initial response type.EventT - Event type being delivered.EventStreamAsyncResponseTransformer.Builder instance.public CompletableFuture<Void> 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<SdkResponse,Void>public void onResponse(SdkResponse response)
AsyncResponseTransformeronResponse in interface AsyncResponseTransformer<SdkResponse,Void>response - The unmarshalled response.public void onStream(SdkPublisher<ByteBuffer> publisher)
AsyncResponseTransformeronStream in interface AsyncResponseTransformer<SdkResponse,Void>publisher - The publisher.public void exceptionOccurred(Throwable throwable)
AsyncResponseTransformerexceptionOccurred in interface AsyncResponseTransformer<SdkResponse,Void>throwable - Error that occurred.Copyright © 2026. All rights reserved.