Class EventStreamAsyncResponseTransformer<ResponseT,EventT>
- java.lang.Object
-
- software.amazon.awssdk.awscore.eventstream.EventStreamAsyncResponseTransformer<ResponseT,EventT>
-
- Type Parameters:
ResponseT
- Initial response type of event stream operation.EventT
- Base type of event stream message frames.
- All Implemented Interfaces:
AsyncResponseTransformer<SdkResponse,Void>
public final class EventStreamAsyncResponseTransformer<ResponseT,EventT> extends Object implements AsyncResponseTransformer<SdkResponse,Void>
Unmarshalling layer on top of theAsyncResponseTransformer
to decode event stream messages and deliver them to the subscriber.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventStreamAsyncResponseTransformer.Builder<ResponseT,EventT>
Builder forEventStreamAsyncResponseTransformer
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <ResponseT,EventT>
EventStreamAsyncResponseTransformer.Builder<ResponseT,EventT>builder()
Creates aEventStreamAsyncResponseTransformer.Builder
used to createEventStreamAsyncResponseTransformer
.void
exceptionOccurred(Throwable throwable)
void
onResponse(SdkResponse response)
void
onStream(SdkPublisher<ByteBuffer> publisher)
CompletableFuture<Void>
prepare()
-
-
-
Method Detail
-
builder
public static <ResponseT,EventT> EventStreamAsyncResponseTransformer.Builder<ResponseT,EventT> builder()
Creates aEventStreamAsyncResponseTransformer.Builder
used to createEventStreamAsyncResponseTransformer
.- Type Parameters:
ResponseT
- Initial response type.EventT
- Event type being delivered.- Returns:
- New
EventStreamAsyncResponseTransformer.Builder
instance.
-
prepare
public CompletableFuture<Void> prepare()
- Specified by:
prepare
in interfaceAsyncResponseTransformer<ResponseT,EventT>
-
onResponse
public void onResponse(SdkResponse response)
- Specified by:
onResponse
in interfaceAsyncResponseTransformer<ResponseT,EventT>
-
onStream
public void onStream(SdkPublisher<ByteBuffer> publisher)
- Specified by:
onStream
in interfaceAsyncResponseTransformer<ResponseT,EventT>
-
exceptionOccurred
public void exceptionOccurred(Throwable throwable)
- Specified by:
exceptionOccurred
in interfaceAsyncResponseTransformer<ResponseT,EventT>
-
-