Class 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 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 use
        options - 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 use
        options - 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:
        close in interface AutoCloseable
      • 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 configuration
        options - 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 configuration
        options - 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 configuration
        options - 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