Class MqttRequestResponseClient

  • All Implemented Interfaces:
    AutoCloseable

    public class MqttRequestResponseClient
    extends CrtResource
    A helper class for AWS service clients that use MQTT as the transport protocol. The class supports orchestrating request-response operations and creating streaming operations. Used by the IoT SDKs to implement higher-level service clients that provide a good user experience. Not intended to be constructed or used directly; the service client will create one during its construction.
    • Constructor Detail

      • MqttRequestResponseClient

        public MqttRequestResponseClient​(Mqtt5Client client,
                                         MqttRequestResponseClientOptions options)
        MQTT5-based constructor for request-response service clients
        Parameters:
        client - MQTT5 client that the request-response client should use as transport
        options - request-response client configuration options
      • MqttRequestResponseClient

        public MqttRequestResponseClient​(MqttClientConnection client,
                                         MqttRequestResponseClientOptions options)
        MQTT311-based constructor for request-response service clients
        Parameters:
        client - MQTT311 client that the request-response client should use as transport
        options - request-response client configuration options
    • Method Detail

      • createStream

        public StreamingOperation createStream​(StreamingOperationOptions options)
        Creates a new streaming operation from a set of configuration options. A streaming operation provides a mechanism for listening to a specific event stream from an AWS MQTT-based service.
        Parameters:
        options - configuration options for the streaming operation
        Returns:
        a new streaming operation instance