Package software.amazon.awssdk.crt.iot
Class StreamingOperationOptions.StreamingOperationOptionsBuilder
java.lang.Object
software.amazon.awssdk.crt.iot.StreamingOperationOptions.StreamingOperationOptionsBuilder
- Enclosing class:
- StreamingOperationOptions
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a StreamingOperationOptions instance from the builder's configuration.Sets the callback function a streaming operation should invoke every time a publish message arrives on the operation's topic.Sets the callback function a streaming operation should invoke whenever the underlying subscription changes status.Sets the MQTT topic that a streaming operation will listen for messages on
-
Method Details
-
withTopic
Sets the MQTT topic that a streaming operation will listen for messages on- Parameters:
topic- MQTT topic to listen to- Returns:
- this builder object
-
withSubscriptionStatusEventCallback
public StreamingOperationOptions.StreamingOperationOptionsBuilder withSubscriptionStatusEventCallback(Consumer<SubscriptionStatusEvent> callback) Sets the callback function a streaming operation should invoke whenever the underlying subscription changes status.- Parameters:
callback- function to invoke on streaming subscription status changes- Returns:
- this builder object
-
withIncomingPublishEventCallback
public StreamingOperationOptions.StreamingOperationOptionsBuilder withIncomingPublishEventCallback(Consumer<IncomingPublishEvent> callback) Sets the callback function a streaming operation should invoke every time a publish message arrives on the operation's topic.- Parameters:
callback- function to invoke whenever a publish messages arrives that matches the operation's topic- Returns:
- this builder object
-
build
Creates a StreamingOperationOptions instance from the builder's configuration.- Returns:
- a new StreamingOperationOptions instance
-