Class IotShadowClient
java.lang.Object
software.amazon.awssdk.iot.iotshadow.IotShadowClient
The AWS IoT Device Shadow service adds shadows to AWS IoT thing objects. Shadows are a simple data store for device properties and state. Shadows can make a device’s state available to apps and other services whether the device is connected to AWS IoT or not.
AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html
-
Constructor Summary
ConstructorsConstructorDescriptionIotShadowClient(software.amazon.awssdk.crt.mqtt.MqttClientConnection connection) Constructs a new IotShadowClient -
Method Summary
Modifier and TypeMethodDescriptionPublishDeleteNamedShadow(DeleteNamedShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Deletes a named shadow for an AWS IoT thing.PublishDeleteShadow(DeleteShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Deletes the (classic) shadow for an AWS IoT thing.PublishGetNamedShadow(GetNamedShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Gets a named shadow for an AWS IoT thing.PublishGetShadow(GetShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Gets the (classic) shadow for an AWS IoT thing.PublishUpdateNamedShadow(UpdateNamedShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Update a named shadow for a device.PublishUpdateShadow(UpdateShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Update a device's (classic) shadow.SubscribeToDeleteNamedShadowAccepted(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler) Subscribes to the accepted topic for the DeleteNamedShadow operation.SubscribeToDeleteNamedShadowAccepted(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the DeleteNamedShadow operation.SubscribeToDeleteNamedShadowRejected(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the DeleteNamedShadow operation.SubscribeToDeleteNamedShadowRejected(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the DeleteNamedShadow operation.SubscribeToDeleteShadowAccepted(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler) Subscribes to the accepted topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToDeleteShadowAccepted(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToDeleteShadowRejected(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToDeleteShadowRejected(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToGetNamedShadowAccepted(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler) Subscribes to the accepted topic for the GetNamedShadow operation.SubscribeToGetNamedShadowAccepted(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the GetNamedShadow operation.SubscribeToGetNamedShadowRejected(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the GetNamedShadow operation.SubscribeToGetNamedShadowRejected(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the GetNamedShadow operation.SubscribeToGetShadowAccepted(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler) Subscribes to the accepted topic for the GetShadow operation.SubscribeToGetShadowAccepted(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the GetShadow operation.SubscribeToGetShadowRejected(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the GetShadow operation.SubscribeToGetShadowRejected(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the GetShadow operation.SubscribeToNamedShadowDeltaUpdatedEvents(NamedShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler) Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.SubscribeToNamedShadowDeltaUpdatedEvents(NamedShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing.SubscribeToNamedShadowUpdatedEvents(NamedShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler) Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.SubscribeToNamedShadowUpdatedEvents(NamedShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing.SubscribeToShadowDeltaUpdatedEvents(ShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler) Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.SubscribeToShadowDeltaUpdatedEvents(ShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing.SubscribeToShadowUpdatedEvents(ShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler) Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.SubscribeToShadowUpdatedEvents(ShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing.SubscribeToUpdateNamedShadowAccepted(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler) Subscribes to the accepted topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToUpdateNamedShadowAccepted(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToUpdateNamedShadowRejected(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToUpdateNamedShadowRejected(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToUpdateShadowAccepted(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler) Subscribes to the accepted topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToUpdateShadowAccepted(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToUpdateShadowRejected(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.SubscribeToUpdateShadowRejected(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received.
-
Constructor Details
-
IotShadowClient
public IotShadowClient(software.amazon.awssdk.crt.mqtt.MqttClientConnection connection) Constructs a new IotShadowClient- Parameters:
connection- The connection to use
-
-
Method Details
-
PublishDeleteNamedShadow
public CompletableFuture<Integer> PublishDeleteNamedShadow(DeleteNamedShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Deletes a named shadow for an AWS IoT thing. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic- Parameters:
request- Message to be serialized and sentqos- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
PublishDeleteShadow
public CompletableFuture<Integer> PublishDeleteShadow(DeleteShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Deletes the (classic) shadow for an AWS IoT thing. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-pub-sub-topic- Parameters:
request- Message to be serialized and sentqos- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
PublishGetNamedShadow
public CompletableFuture<Integer> PublishGetNamedShadow(GetNamedShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Gets a named shadow for an AWS IoT thing. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic- Parameters:
request- Message to be serialized and sentqos- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
PublishGetShadow
public CompletableFuture<Integer> PublishGetShadow(GetShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Gets the (classic) shadow for an AWS IoT thing. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-pub-sub-topic- Parameters:
request- Message to be serialized and sentqos- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
PublishUpdateNamedShadow
public CompletableFuture<Integer> PublishUpdateNamedShadow(UpdateNamedShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Update a named shadow for a device. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic- Parameters:
request- Message to be serialized and sentqos- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
PublishUpdateShadow
public CompletableFuture<Integer> PublishUpdateShadow(UpdateShadowRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos) Update a device's (classic) shadow. If the device is offline, the PUBLISH packet will be sent once the connection resumes. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-pub-sub-topic- Parameters:
request- Message to be serialized and sentqos- Quality of Service for delivering this message- Returns:
- a future containing the MQTT packet id used to perform the publish operation * For QoS 0, completes as soon as the packet is sent. * For QoS 1, completes when PUBACK is received. * QoS 2 is not supported by AWS IoT.
-
SubscribeToDeleteNamedShadowAccepted
public CompletableFuture<Integer> SubscribeToDeleteNamedShadowAccepted(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the DeleteNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToDeleteNamedShadowAccepted
public CompletableFuture<Integer> SubscribeToDeleteNamedShadowAccepted(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler) Subscribes to the accepted topic for the DeleteNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToDeleteNamedShadowRejected
public CompletableFuture<Integer> SubscribeToDeleteNamedShadowRejected(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the DeleteNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToDeleteNamedShadowRejected
public CompletableFuture<Integer> SubscribeToDeleteNamedShadowRejected(DeleteNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the DeleteNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToDeleteShadowAccepted
public CompletableFuture<Integer> SubscribeToDeleteShadowAccepted(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToDeleteShadowAccepted
public CompletableFuture<Integer> SubscribeToDeleteShadowAccepted(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<DeleteShadowResponse> handler) Subscribes to the accepted topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToDeleteShadowRejected
public CompletableFuture<Integer> SubscribeToDeleteShadowRejected(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToDeleteShadowRejected
public CompletableFuture<Integer> SubscribeToDeleteShadowRejected(DeleteShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the DeleteShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#delete-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetNamedShadowAccepted
public CompletableFuture<Integer> SubscribeToGetNamedShadowAccepted(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the GetNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetNamedShadowAccepted
public CompletableFuture<Integer> SubscribeToGetNamedShadowAccepted(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler) Subscribes to the accepted topic for the GetNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetNamedShadowRejected
public CompletableFuture<Integer> SubscribeToGetNamedShadowRejected(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the GetNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetNamedShadowRejected
public CompletableFuture<Integer> SubscribeToGetNamedShadowRejected(GetNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the GetNamedShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetShadowAccepted
public CompletableFuture<Integer> SubscribeToGetShadowAccepted(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the GetShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetShadowAccepted
public CompletableFuture<Integer> SubscribeToGetShadowAccepted(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<GetShadowResponse> handler) Subscribes to the accepted topic for the GetShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetShadowRejected
public CompletableFuture<Integer> SubscribeToGetShadowRejected(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the GetShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToGetShadowRejected
public CompletableFuture<Integer> SubscribeToGetShadowRejected(GetShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the GetShadow operation. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#get-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToNamedShadowDeltaUpdatedEvents
public CompletableFuture<Integer> SubscribeToNamedShadowDeltaUpdatedEvents(NamedShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToNamedShadowDeltaUpdatedEvents
public CompletableFuture<Integer> SubscribeToNamedShadowDeltaUpdatedEvents(NamedShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler) Subscribe to NamedShadowDelta events for a named shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToNamedShadowUpdatedEvents
public CompletableFuture<Integer> SubscribeToNamedShadowUpdatedEvents(NamedShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToNamedShadowUpdatedEvents
public CompletableFuture<Integer> SubscribeToNamedShadowUpdatedEvents(NamedShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler) Subscribe to ShadowUpdated events for a named shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToShadowDeltaUpdatedEvents
public CompletableFuture<Integer> SubscribeToShadowDeltaUpdatedEvents(ShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToShadowDeltaUpdatedEvents
public CompletableFuture<Integer> SubscribeToShadowDeltaUpdatedEvents(ShadowDeltaUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowDeltaUpdatedEvent> handler) Subscribe to ShadowDelta events for the (classic) shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-delta-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToShadowUpdatedEvents
public CompletableFuture<Integer> SubscribeToShadowUpdatedEvents(ShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler, Consumer<Exception> exceptionHandler) Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToShadowUpdatedEvents
public CompletableFuture<Integer> SubscribeToShadowUpdatedEvents(ShadowUpdatedSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ShadowUpdatedEvent> handler) Subscribe to ShadowUpdated events for the (classic) shadow of an AWS IoT thing. Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-documents-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateNamedShadowAccepted
public CompletableFuture<Integer> SubscribeToUpdateNamedShadowAccepted(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateNamedShadowAccepted
public CompletableFuture<Integer> SubscribeToUpdateNamedShadowAccepted(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler) Subscribes to the accepted topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateNamedShadowRejected
public CompletableFuture<Integer> SubscribeToUpdateNamedShadowRejected(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateNamedShadowRejected
public CompletableFuture<Integer> SubscribeToUpdateNamedShadowRejected(UpdateNamedShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the UpdateNamedShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateShadowAccepted
public CompletableFuture<Integer> SubscribeToUpdateShadowAccepted(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the accepted topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateShadowAccepted
public CompletableFuture<Integer> SubscribeToUpdateShadowAccepted(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<UpdateShadowResponse> handler) Subscribes to the accepted topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-accepted-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateShadowRejected
public CompletableFuture<Integer> SubscribeToUpdateShadowRejected(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler, Consumer<Exception> exceptionHandler) Subscribes to the rejected topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topicexceptionHandler- callback function to invoke if an exception occurred deserializing a message- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-
SubscribeToUpdateShadowRejected
public CompletableFuture<Integer> SubscribeToUpdateShadowRejected(UpdateShadowSubscriptionRequest request, software.amazon.awssdk.crt.mqtt.QualityOfService qos, Consumer<ErrorResponse> handler) Subscribes to the rejected topic for the UpdateShadow operation Once subscribed, `handler` is invoked each time a message matching the `topic` is received. It is possible for such messages to arrive before the SUBACK is received. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/device-shadow-mqtt.html#update-rejected-pub-sub-topic- Parameters:
request- Subscription request configurationqos- Maximum requested QoS that server may use when sending messages to the client. The server may grant a lower QoS in the SUBACKhandler- callback function to invoke with messages received on the subscription topic- Returns:
- a future containing the MQTT packet id used to perform the subscribe operation
-