Class DefaultEventStreamResponseHandlerBuilder<ResponseT,EventT,SubBuilderT>  
java.lang.Object
software.amazon.awssdk.awscore.eventstream.DefaultEventStreamResponseHandlerBuilder<ResponseT,EventT,SubBuilderT>  
- Type Parameters:
- ResponseT- Type of POJO response.
- EventT- Type of event being published.
- SubBuilderT- Subtype of builder class for method chaining.
- All Implemented Interfaces:
- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
@SdkProtectedApi
public abstract class DefaultEventStreamResponseHandlerBuilder<ResponseT,EventT,SubBuilderT>  
extends Object
implements EventStreamResponseHandler.Builder<ResponseT,EventT,SubBuilderT>  
Base class for event stream response handler builders.
- 
Method SummaryModifier and TypeMethodDescriptiononComplete(Runnable onComplete) Action to invoke when the event stream completes.Callback to invoke in the event on an error.onEventStream(Consumer<SdkPublisher<EventT>> onSubscribe) Callback to invoke when theSdkPublisheris available.onResponse(Consumer<ResponseT> responseConsumer) Callback to invoke when the initial response is received.publisherTransformer(Function<SdkPublisher<EventT>, SdkPublisher<EventT>> publisherTransformer) Allows for optional transformation of the publisher of events before subscribing.subscriber(Consumer<EventT> eventConsumer) Sets the subscriber to theSdkPublisherof events.subscriber(Supplier<org.reactivestreams.Subscriber<EventT>> eventSubscriber) Subscriber that will subscribe to theSdkPublisherof events.
- 
Method Details- 
onResponseDescription copied from interface:EventStreamResponseHandler.BuilderCallback to invoke when the initial response is received.- Specified by:
- onResponsein interface- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
- Parameters:
- responseConsumer- Callback that will process the initial response.
- Returns:
- This builder for method chaining.
 
- 
onErrorDescription copied from interface:EventStreamResponseHandler.BuilderCallback to invoke in the event on an error. TheConsumer.accept(Object)method may be called multiple times during the lifecycle of a request if automatic retries are enabled.- Specified by:
- onErrorin interface- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
- Parameters:
- consumer- Callback that will process any error that occurs.
- Returns:
- This builder for method chaining.
 
- 
onCompleteDescription copied from interface:EventStreamResponseHandler.BuilderAction to invoke when the event stream completes. This will only be invoked when all events are being received.- Specified by:
- onCompletein interface- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
- Parameters:
- onComplete- Action to run on the completion of the event stream.
- Returns:
- This builder for method chaining.
 
- 
subscriberDescription copied from interface:EventStreamResponseHandler.BuilderSubscriber that will subscribe to theSdkPublisherof events. Subscriber must be provided.- Specified by:
- subscriberin interface- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
- Parameters:
- eventSubscriber- Supplier for a subscriber that will be subscribed to the publisher of events.
- Returns:
- This builder for method chaining.
 
- 
subscriberDescription copied from interface:EventStreamResponseHandler.BuilderSets the subscriber to theSdkPublisherof events. The given consumer will be called for each event received by the publisher. Events are requested sequentially after each event is processed. If you need more control over the backpressure strategy consider usingEventStreamResponseHandler.Builder.subscriber(Supplier)instead.- Specified by:
- subscriberin interface- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
- Parameters:
- eventConsumer- Consumer that will process incoming events.
- Returns:
- This builder for method chaining.
 
- 
onEventStreamDescription copied from interface:EventStreamResponseHandler.BuilderCallback to invoke when theSdkPublisheris available. This callback must subscribe to the given publisher. This method should not be used withEventStreamResponseHandler.Builder.subscriber(Supplier)or any of it's overloads.- Specified by:
- onEventStreamin interface- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
- Parameters:
- onSubscribe- Callback that will subscribe to the- SdkPublisher.
- Returns:
- This builder for method chaining.
 
- 
publisherTransformerpublic SubBuilderT publisherTransformer(Function<SdkPublisher<EventT>, SdkPublisher<EventT>> publisherTransformer) Description copied from interface:EventStreamResponseHandler.BuilderAllows for optional transformation of the publisher of events before subscribing. This transformation must return aSdkPublisherof the same type so methods likeSdkPublisher.map(Function)andSdkPublisher.buffer(int)that change the type cannot be used with this method.- Specified by:
- publisherTransformerin interface- EventStreamResponseHandler.Builder<ResponseT,- EventT, - SubBuilderT> 
- Parameters:
- publisherTransformer- Function that returns a new- SdkPublisherwith augmented behavior.
- Returns:
- This builder for method chaining.
 
 
-