Interface InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler.Builder
- All Superinterfaces:
EventStreamResponseHandler.Builder<InvokeGlobalInferenceGatewayWithResponseStreamResponse,ResponseStream, InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler.Builder>
- Enclosing interface:
InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler
@Generated("software.amazon.awssdk:codegen")
public static interface InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler.Builder
extends EventStreamResponseHandler.Builder<InvokeGlobalInferenceGatewayWithResponseStreamResponse,ResponseStream,InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler.Builder>
Builder for
InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler. This can be used to create the
InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler in a more functional way. Directly
implementing the InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler interface is possible but
requires subscribing to the event publisher, requesting data via the Subscription, resetting state on retry, and
freeing resources on error; the builder handles all of this automatically.-
Method Summary
Methods inherited from interface software.amazon.awssdk.awscore.eventstream.EventStreamResponseHandler.Builder
onComplete, onError, onEventStream, onResponse, publisherTransformer, subscriber, subscriber
-
Method Details
-
subscriber
InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler.Builder subscriber(InvokeGlobalInferenceGatewayWithResponseStreamResponseHandler.Visitor visitor) Sets the subscriber to thePublisherof events. The givenInvokeGlobalInferenceGatewayWithResponseStreamResponseHandler.Visitorwill 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(java.util.function.Supplier)instead.- Parameters:
visitor- Visitor that will be invoked for each incoming event.- Returns:
- This builder for method chaining
-
build
- Returns:
- A
InvokeGlobalInferenceGatewayWithResponseStreamResponseHandlerimplementation that can be used in the InvokeGlobalInferenceGatewayWithResponseStream API call.
-