Class IotCommandsV2Client
- java.lang.Object
-
- software.amazon.awssdk.iot.iotcommands.IotCommandsV2Client
-
- All Implemented Interfaces:
AutoCloseable
public class IotCommandsV2Client extends Object implements AutoCloseable
The AWS IoT commands service is used to send an instruction from the cloud to a device that is connected to AWS IoT. AWS documentation: https://docs.aws.amazon.com/iot/latest/developerguide/iot-remote-command.html
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Releases all resources used by the client.software.amazon.awssdk.crt.iot.StreamingOperationcreateCommandExecutionsCborPayloadStream(CommandExecutionsSubscriptionRequest request, V2ClientStreamOptions<CommandExecutionEvent> options)Creates a stream of CommandExecution notifications for a given IoT thing.software.amazon.awssdk.crt.iot.StreamingOperationcreateCommandExecutionsGenericPayloadStream(CommandExecutionsSubscriptionRequest request, V2ClientStreamOptions<CommandExecutionEvent> options)Creates a stream of CommandExecution notifications for a given IoT thing.software.amazon.awssdk.crt.iot.StreamingOperationcreateCommandExecutionsJsonPayloadStream(CommandExecutionsSubscriptionRequest request, V2ClientStreamOptions<CommandExecutionEvent> options)Creates a stream of CommandExecution notifications for a given IoT thing.static IotCommandsV2ClientnewFromMqtt311(software.amazon.awssdk.crt.mqtt.MqttClientConnection protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options)Constructs a new IotCommandsV2Client, using an MQTT311 client as transportstatic IotCommandsV2ClientnewFromMqtt5(software.amazon.awssdk.crt.mqtt5.Mqtt5Client protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options)Constructs a new IotCommandsV2Client, using an MQTT5 client as transportCompletableFuture<UpdateCommandExecutionResponse>updateCommandExecution(UpdateCommandExecutionRequest request)Update the status of a command execution.
-
-
-
Method Detail
-
newFromMqtt5
public static IotCommandsV2Client newFromMqtt5(software.amazon.awssdk.crt.mqtt5.Mqtt5Client protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options)
Constructs a new IotCommandsV2Client, using an MQTT5 client as transport- Parameters:
protocolClient- the MQTT5 client to useoptions- configuration options to use
-
newFromMqtt311
public static IotCommandsV2Client newFromMqtt311(software.amazon.awssdk.crt.mqtt.MqttClientConnection protocolClient, software.amazon.awssdk.crt.iot.MqttRequestResponseClientOptions options)
Constructs a new IotCommandsV2Client, using an MQTT311 client as transport- Parameters:
protocolClient- the MQTT311 client to useoptions- configuration options to use
-
close
public void close()
Releases all resources used by the client. It is not valid to invoke operations on the client after it has been closed.- Specified by:
closein interfaceAutoCloseable
-
updateCommandExecution
public CompletableFuture<UpdateCommandExecutionResponse> updateCommandExecution(UpdateCommandExecutionRequest request)
Update the status of a command execution.- Parameters:
request- modeled request to perform- Returns:
- a future that will complete with the corresponding response
-
createCommandExecutionsCborPayloadStream
public software.amazon.awssdk.crt.iot.StreamingOperation createCommandExecutionsCborPayloadStream(CommandExecutionsSubscriptionRequest request, V2ClientStreamOptions<CommandExecutionEvent> options)
Creates a stream of CommandExecution notifications for a given IoT thing.- Parameters:
request- modeled streaming operation subscription configurationoptions- set of callbacks that the operation should invoke in response to related events- Returns:
- a streaming operation which will invoke a callback every time a message is received on the associated MQTT topic
-
createCommandExecutionsGenericPayloadStream
public software.amazon.awssdk.crt.iot.StreamingOperation createCommandExecutionsGenericPayloadStream(CommandExecutionsSubscriptionRequest request, V2ClientStreamOptions<CommandExecutionEvent> options)
Creates a stream of CommandExecution notifications for a given IoT thing.- Parameters:
request- modeled streaming operation subscription configurationoptions- set of callbacks that the operation should invoke in response to related events- Returns:
- a streaming operation which will invoke a callback every time a message is received on the associated MQTT topic
-
createCommandExecutionsJsonPayloadStream
public software.amazon.awssdk.crt.iot.StreamingOperation createCommandExecutionsJsonPayloadStream(CommandExecutionsSubscriptionRequest request, V2ClientStreamOptions<CommandExecutionEvent> options)
Creates a stream of CommandExecution notifications for a given IoT thing.- Parameters:
request- modeled streaming operation subscription configurationoptions- set of callbacks that the operation should invoke in response to related events- Returns:
- a streaming operation which will invoke a callback every time a message is received on the associated MQTT topic
-
-