Search in sources :

Example 21 with CrtRuntimeException

use of software.amazon.awssdk.crt.CrtRuntimeException in project aws-iot-device-sdk-java-v2 by aws.

the class JobsSample method main.

public static void main(String[] args) {
    cmdUtils = new CommandLineUtils();
    cmdUtils.registerProgramName("JobsSample");
    cmdUtils.addCommonMQTTCommands();
    cmdUtils.registerCommand("key", "<path>", "Path to your key in PEM format.");
    cmdUtils.registerCommand("cert", "<path>", "Path to your client certificate in PEM format.");
    cmdUtils.registerCommand("client_id", "<int>", "Client id to use (optional, default='test-*').");
    cmdUtils.registerCommand("thing_name", "<str>", "The name of the IoT thing.");
    cmdUtils.registerCommand("port", "<int>", "Port to connect to on the endpoint (optional, default='8883').");
    cmdUtils.sendArguments(args);
    thingName = cmdUtils.getCommandRequired("thing_name", "");
    MqttClientConnectionEvents callbacks = new MqttClientConnectionEvents() {

        @Override
        public void onConnectionInterrupted(int errorCode) {
            if (errorCode != 0) {
                System.out.println("Connection interrupted: " + errorCode + ": " + CRT.awsErrorString(errorCode));
            }
        }

        @Override
        public void onConnectionResumed(boolean sessionPresent) {
            System.out.println("Connection resumed: " + (sessionPresent ? "existing session" : "clean session"));
        }
    };
    try {
        MqttClientConnection connection = cmdUtils.buildMQTTConnection(callbacks);
        IotJobsClient jobs = new IotJobsClient(connection);
        CompletableFuture<Boolean> connected = connection.connect();
        try {
            boolean sessionPresent = connected.get();
            System.out.println("Connected to " + (!sessionPresent ? "new" : "existing") + " session!");
        } catch (Exception ex) {
            throw new RuntimeException("Exception occurred during connect", ex);
        }
        {
            gotResponse = new CompletableFuture<>();
            GetPendingJobExecutionsSubscriptionRequest subscriptionRequest = new GetPendingJobExecutionsSubscriptionRequest();
            subscriptionRequest.thingName = thingName;
            CompletableFuture<Integer> subscribed = jobs.SubscribeToGetPendingJobExecutionsAccepted(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onGetPendingJobExecutionsAccepted);
            try {
                subscribed.get();
                System.out.println("Subscribed to GetPendingJobExecutionsAccepted");
            } catch (Exception ex) {
                throw new RuntimeException("Failed to subscribe to GetPendingJobExecutions", ex);
            }
            subscribed = jobs.SubscribeToGetPendingJobExecutionsRejected(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onRejectedError);
            subscribed.get();
            System.out.println("Subscribed to GetPendingJobExecutionsRejected");
            GetPendingJobExecutionsRequest publishRequest = new GetPendingJobExecutionsRequest();
            publishRequest.thingName = thingName;
            CompletableFuture<Integer> published = jobs.PublishGetPendingJobExecutions(publishRequest, QualityOfService.AT_LEAST_ONCE);
            try {
                published.get();
                gotResponse.get();
            } catch (Exception ex) {
                throw new RuntimeException("Exception occurred during publish", ex);
            }
        }
        if (availableJobs.isEmpty()) {
            System.out.println("No jobs queued, no further work to do");
        }
        for (String jobId : availableJobs) {
            gotResponse = new CompletableFuture<>();
            DescribeJobExecutionSubscriptionRequest subscriptionRequest = new DescribeJobExecutionSubscriptionRequest();
            subscriptionRequest.thingName = thingName;
            subscriptionRequest.jobId = jobId;
            jobs.SubscribeToDescribeJobExecutionAccepted(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onDescribeJobExecutionAccepted);
            jobs.SubscribeToDescribeJobExecutionRejected(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onRejectedError);
            DescribeJobExecutionRequest publishRequest = new DescribeJobExecutionRequest();
            publishRequest.thingName = thingName;
            publishRequest.jobId = jobId;
            publishRequest.includeJobDocument = true;
            publishRequest.executionNumber = 1L;
            jobs.PublishDescribeJobExecution(publishRequest, QualityOfService.AT_LEAST_ONCE);
            gotResponse.get();
        }
        for (int jobIdx = 0; jobIdx < availableJobs.size(); ++jobIdx) {
            {
                gotResponse = new CompletableFuture<>();
                // Start the next pending job
                StartNextPendingJobExecutionSubscriptionRequest subscriptionRequest = new StartNextPendingJobExecutionSubscriptionRequest();
                subscriptionRequest.thingName = thingName;
                jobs.SubscribeToStartNextPendingJobExecutionAccepted(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onStartNextPendingJobExecutionAccepted);
                jobs.SubscribeToStartNextPendingJobExecutionRejected(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onRejectedError);
                StartNextPendingJobExecutionRequest publishRequest = new StartNextPendingJobExecutionRequest();
                publishRequest.thingName = thingName;
                publishRequest.stepTimeoutInMinutes = 15L;
                jobs.PublishStartNextPendingJobExecution(publishRequest, QualityOfService.AT_LEAST_ONCE);
                gotResponse.get();
            }
            {
                // Update the service to let it know we're executing
                gotResponse = new CompletableFuture<>();
                UpdateJobExecutionSubscriptionRequest subscriptionRequest = new UpdateJobExecutionSubscriptionRequest();
                subscriptionRequest.thingName = thingName;
                subscriptionRequest.jobId = currentJobId;
                jobs.SubscribeToUpdateJobExecutionAccepted(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, (response) -> {
                    System.out.println("Marked job " + currentJobId + " IN_PROGRESS");
                    gotResponse.complete(null);
                });
                jobs.SubscribeToUpdateJobExecutionRejected(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onRejectedError);
                UpdateJobExecutionRequest publishRequest = new UpdateJobExecutionRequest();
                publishRequest.thingName = thingName;
                publishRequest.jobId = currentJobId;
                publishRequest.executionNumber = currentExecutionNumber;
                publishRequest.status = JobStatus.IN_PROGRESS;
                publishRequest.expectedVersion = currentVersionNumber++;
                jobs.PublishUpdateJobExecution(publishRequest, QualityOfService.AT_LEAST_ONCE);
                gotResponse.get();
            }
            // Fake doing something
            Thread.sleep(1000);
            {
                // Update the service to let it know we're done
                gotResponse = new CompletableFuture<>();
                UpdateJobExecutionSubscriptionRequest subscriptionRequest = new UpdateJobExecutionSubscriptionRequest();
                subscriptionRequest.thingName = thingName;
                subscriptionRequest.jobId = currentJobId;
                jobs.SubscribeToUpdateJobExecutionAccepted(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, (response) -> {
                    System.out.println("Marked job " + currentJobId + " SUCCEEDED");
                    gotResponse.complete(null);
                });
                jobs.SubscribeToUpdateJobExecutionRejected(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, JobsSample::onRejectedError);
                UpdateJobExecutionRequest publishRequest = new UpdateJobExecutionRequest();
                publishRequest.thingName = thingName;
                publishRequest.jobId = currentJobId;
                publishRequest.executionNumber = currentExecutionNumber;
                publishRequest.status = JobStatus.SUCCEEDED;
                publishRequest.expectedVersion = currentVersionNumber++;
                jobs.PublishUpdateJobExecution(publishRequest, QualityOfService.AT_LEAST_ONCE);
                gotResponse.get();
            }
        }
        CompletableFuture<Void> disconnected = connection.disconnect();
        disconnected.get();
    } catch (CrtRuntimeException | InterruptedException | ExecutionException ex) {
        System.out.println("Exception encountered: " + ex.toString());
    }
    CrtResource.waitForNoResources();
    System.out.println("Complete!");
}
Also used : CommandLineUtils(utils.commandlineutils.CommandLineUtils) UpdateJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest) CompletableFuture(java.util.concurrent.CompletableFuture) RejectedError(software.amazon.awssdk.iot.iotjobs.model.RejectedError) MqttClientConnectionEvents(software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents) StartNextPendingJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.StartNextPendingJobExecutionSubscriptionRequest) DescribeJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.DescribeJobExecutionRequest) DescribeJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.DescribeJobExecutionSubscriptionRequest) CrtResource(software.amazon.awssdk.crt.CrtResource) UpdateJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionSubscriptionRequest) QualityOfService(software.amazon.awssdk.crt.mqtt.QualityOfService) GetPendingJobExecutionsSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.GetPendingJobExecutionsSubscriptionRequest) GetPendingJobExecutionsResponse(software.amazon.awssdk.iot.iotjobs.model.GetPendingJobExecutionsResponse) AwsIotMqttConnectionBuilder(software.amazon.awssdk.iot.AwsIotMqttConnectionBuilder) LinkedList(java.util.LinkedList) JobStatus(software.amazon.awssdk.iot.iotjobs.model.JobStatus) CRT(software.amazon.awssdk.crt.CRT) IotJobsClient(software.amazon.awssdk.iot.iotjobs.IotJobsClient) GetPendingJobExecutionsRequest(software.amazon.awssdk.iot.iotjobs.model.GetPendingJobExecutionsRequest) MqttClientConnection(software.amazon.awssdk.crt.mqtt.MqttClientConnection) StartNextPendingJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.StartNextPendingJobExecutionRequest) DescribeJobExecutionResponse(software.amazon.awssdk.iot.iotjobs.model.DescribeJobExecutionResponse) UUID(java.util.UUID) ExecutionException(java.util.concurrent.ExecutionException) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) List(java.util.List) StartNextJobExecutionResponse(software.amazon.awssdk.iot.iotjobs.model.StartNextJobExecutionResponse) JobExecutionSummary(software.amazon.awssdk.iot.iotjobs.model.JobExecutionSummary) Log(software.amazon.awssdk.crt.Log) MqttClientConnection(software.amazon.awssdk.crt.mqtt.MqttClientConnection) MqttClientConnectionEvents(software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents) GetPendingJobExecutionsSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.GetPendingJobExecutionsSubscriptionRequest) IotJobsClient(software.amazon.awssdk.iot.iotjobs.IotJobsClient) CompletableFuture(java.util.concurrent.CompletableFuture) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) CommandLineUtils(utils.commandlineutils.CommandLineUtils) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) ExecutionException(java.util.concurrent.ExecutionException) GetPendingJobExecutionsRequest(software.amazon.awssdk.iot.iotjobs.model.GetPendingJobExecutionsRequest) StartNextPendingJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.StartNextPendingJobExecutionRequest) DescribeJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.DescribeJobExecutionRequest) UpdateJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionSubscriptionRequest) ExecutionException(java.util.concurrent.ExecutionException) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) DescribeJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.DescribeJobExecutionSubscriptionRequest) StartNextPendingJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.StartNextPendingJobExecutionSubscriptionRequest) UpdateJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest)

Example 22 with CrtRuntimeException

use of software.amazon.awssdk.crt.CrtRuntimeException in project aws-iot-device-sdk-java-v2 by aws.

the class WebsocketConnect method main.

public static void main(String[] args) {
    cmdUtils = new CommandLineUtils();
    cmdUtils.registerProgramName("WebsocketConnect");
    cmdUtils.addCommonMQTTCommands();
    cmdUtils.addCommonProxyCommands();
    cmdUtils.registerCommand("signing_region", "<str>", "AWS IoT service region.");
    cmdUtils.registerCommand("client_id", "<int>", "Client id to use (optional, default='test-*').");
    cmdUtils.registerCommand("port", "<int>", "Port to connect to on the endpoint (optional, default='8883').");
    cmdUtils.sendArguments(args);
    MqttClientConnectionEvents callbacks = new MqttClientConnectionEvents() {

        @Override
        public void onConnectionInterrupted(int errorCode) {
            if (errorCode != 0) {
                System.out.println("Connection interrupted: " + errorCode + ": " + CRT.awsErrorString(errorCode));
            }
        }

        @Override
        public void onConnectionResumed(boolean sessionPresent) {
            System.out.println("Connection resumed: " + (sessionPresent ? "existing session" : "clean session"));
        }
    };
    try {
        // Create a connection using a certificate and key
        // Note: The data for the connection is gotten from cmdUtils.
        // (see buildDirectMQTTConnection for implementation)
        MqttClientConnection connection = cmdUtils.buildWebsocketMQTTConnection(callbacks);
        if (connection == null) {
            onApplicationFailure(new RuntimeException("MQTT connection creation failed!"));
        }
        // Connect and disconnect using the connection we created
        // (see sampleConnectAndDisconnect for implementation)
        cmdUtils.sampleConnectAndDisconnect(connection);
    } catch (CrtRuntimeException | InterruptedException | ExecutionException ex) {
        onApplicationFailure(ex);
    }
    CrtResource.waitForNoResources();
    System.out.println("Complete!");
}
Also used : CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) MqttClientConnection(software.amazon.awssdk.crt.mqtt.MqttClientConnection) CommandLineUtils(utils.commandlineutils.CommandLineUtils) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) MqttClientConnectionEvents(software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents) ExecutionException(java.util.concurrent.ExecutionException)

Example 23 with CrtRuntimeException

use of software.amazon.awssdk.crt.CrtRuntimeException in project aws-iot-device-sdk-java-v2 by aws.

the class X509CredentialsProviderConnect method main.

public static void main(String[] args) {
    cmdUtils = new CommandLineUtils();
    cmdUtils.registerProgramName("x509CredentialsProviderConnect");
    cmdUtils.addCommonMQTTCommands();
    cmdUtils.addCommonProxyCommands();
    cmdUtils.addCommonX509Commands();
    cmdUtils.registerCommand("signing_region", "<str>", "AWS IoT service region.");
    cmdUtils.registerCommand("client_id", "<int>", "Client id to use (optional, default='test-*').");
    cmdUtils.registerCommand("port", "<int>", "Port to connect to on the endpoint (optional, default='8883').");
    cmdUtils.sendArguments(args);
    MqttClientConnectionEvents callbacks = new MqttClientConnectionEvents() {

        @Override
        public void onConnectionInterrupted(int errorCode) {
            if (errorCode != 0) {
                System.out.println("Connection interrupted: " + errorCode + ": " + CRT.awsErrorString(errorCode));
            }
        }

        @Override
        public void onConnectionResumed(boolean sessionPresent) {
            System.out.println("Connection resumed: " + (sessionPresent ? "existing session" : "clean session"));
        }
    };
    try {
        // Create a connection using a certificate and key
        // Note: The data for the connection is gotten from cmdUtils.
        // (see buildWebsocketX509MQTTConnection for implementation)
        MqttClientConnection connection = cmdUtils.buildWebsocketX509MQTTConnection(callbacks);
        if (connection == null) {
            onApplicationFailure(new RuntimeException("MQTT connection creation failed!"));
        }
        // Connect and disconnect using the connection we created
        // (see sampleConnectAndDisconnect for implementation)
        cmdUtils.sampleConnectAndDisconnect(connection);
    } catch (CrtRuntimeException | InterruptedException | ExecutionException ex) {
        onApplicationFailure(ex);
    }
    CrtResource.waitForNoResources();
    System.out.println("Complete!");
}
Also used : CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) MqttClientConnection(software.amazon.awssdk.crt.mqtt.MqttClientConnection) CommandLineUtils(utils.commandlineutils.CommandLineUtils) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) MqttClientConnectionEvents(software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents) ExecutionException(java.util.concurrent.ExecutionException)

Example 24 with CrtRuntimeException

use of software.amazon.awssdk.crt.CrtRuntimeException in project aws-iot-device-sdk-java-v2 by aws.

the class MQTTSubscribe method main.

public static void main(String[] args) {
    if (!DATestUtils.init(DATestUtils.TestType.SUB_PUB)) {
        throw new RuntimeException("Failed to initialize environment variables.");
    }
    try (AwsIotMqttConnectionBuilder builder = AwsIotMqttConnectionBuilder.newMtlsBuilderFromPath(DATestUtils.certificatePath, DATestUtils.keyPath)) {
        builder.withClientId(clientId).withEndpoint(DATestUtils.endpoint).withPort((short) port).withCleanSession(true).withPingTimeoutMs(60000).withProtocolOperationTimeoutMs(60000);
        try (MqttClientConnection connection = builder.build()) {
            CompletableFuture<Boolean> connected = connection.connect();
            try {
                boolean sessionPresent = connected.get();
            } catch (Exception ex) {
                throw new RuntimeException("Exception occurred during connect", ex);
            }
            CompletableFuture<Integer> subscribed = connection.subscribe(DATestUtils.topic, QualityOfService.AT_MOST_ONCE, (message) -> {
            });
            subscribed.get();
            CompletableFuture<Void> disconnected = connection.disconnect();
            disconnected.get();
        }
    } catch (CrtRuntimeException | InterruptedException | ExecutionException ex) {
        onApplicationFailure(ex);
    }
    System.exit(0);
}
Also used : MqttClientConnection(software.amazon.awssdk.crt.mqtt.MqttClientConnection) ExecutionException(java.util.concurrent.ExecutionException) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) AwsIotMqttConnectionBuilder(software.amazon.awssdk.iot.AwsIotMqttConnectionBuilder) ExecutionException(java.util.concurrent.ExecutionException)

Example 25 with CrtRuntimeException

use of software.amazon.awssdk.crt.CrtRuntimeException in project aws-iot-device-sdk-java-v2 by aws.

the class PubSub method main.

public static void main(String[] args) {
    cmdUtils = new CommandLineUtils();
    cmdUtils.registerProgramName("PubSub");
    cmdUtils.addCommonMQTTCommands();
    cmdUtils.addCommonTopicMessageCommands();
    cmdUtils.registerCommand("key", "<path>", "Path to your key in PEM format.");
    cmdUtils.registerCommand("cert", "<path>", "Path to your client certificate in PEM format.");
    cmdUtils.registerCommand("client_id", "<int>", "Client id to use (optional, default='test-*').");
    cmdUtils.registerCommand("port", "<int>", "Port to connect to on the endpoint (optional, default='8883').");
    cmdUtils.registerCommand("count", "<int>", "Number of messages to publish (optional, default='10').");
    cmdUtils.sendArguments(args);
    topic = cmdUtils.getCommandOrDefault("topic", topic);
    message = cmdUtils.getCommandOrDefault("message", message);
    messagesToPublish = Integer.parseInt(cmdUtils.getCommandOrDefault("count", String.valueOf(messagesToPublish)));
    MqttClientConnectionEvents callbacks = new MqttClientConnectionEvents() {

        @Override
        public void onConnectionInterrupted(int errorCode) {
            if (errorCode != 0) {
                System.out.println("Connection interrupted: " + errorCode + ": " + CRT.awsErrorString(errorCode));
            }
        }

        @Override
        public void onConnectionResumed(boolean sessionPresent) {
            System.out.println("Connection resumed: " + (sessionPresent ? "existing session" : "clean session"));
        }
    };
    try {
        MqttClientConnection connection = cmdUtils.buildMQTTConnection(callbacks);
        if (connection == null) {
            onApplicationFailure(new RuntimeException("MQTT connection creation failed!"));
        }
        CompletableFuture<Boolean> connected = connection.connect();
        try {
            boolean sessionPresent = connected.get();
            System.out.println("Connected to " + (!sessionPresent ? "new" : "existing") + " session!");
        } catch (Exception ex) {
            throw new RuntimeException("Exception occurred during connect", ex);
        }
        CountDownLatch countDownLatch = new CountDownLatch(messagesToPublish);
        CompletableFuture<Integer> subscribed = connection.subscribe(topic, QualityOfService.AT_LEAST_ONCE, (message) -> {
            String payload = new String(message.getPayload(), StandardCharsets.UTF_8);
            System.out.println("MESSAGE: " + payload);
            countDownLatch.countDown();
        });
        subscribed.get();
        int count = 0;
        while (count++ < messagesToPublish) {
            CompletableFuture<Integer> published = connection.publish(new MqttMessage(topic, message.getBytes(), QualityOfService.AT_LEAST_ONCE, false));
            published.get();
            Thread.sleep(1000);
        }
        countDownLatch.await();
        CompletableFuture<Void> disconnected = connection.disconnect();
        disconnected.get();
    } catch (CrtRuntimeException | InterruptedException | ExecutionException ex) {
        onApplicationFailure(ex);
    }
    CrtResource.waitForNoResources();
    System.out.println("Complete!");
}
Also used : MqttMessage(software.amazon.awssdk.crt.mqtt.MqttMessage) MqttClientConnection(software.amazon.awssdk.crt.mqtt.MqttClientConnection) MqttClientConnectionEvents(software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents) CountDownLatch(java.util.concurrent.CountDownLatch) ExecutionException(java.util.concurrent.ExecutionException) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) CommandLineUtils(utils.commandlineutils.CommandLineUtils) CrtRuntimeException(software.amazon.awssdk.crt.CrtRuntimeException) ExecutionException(java.util.concurrent.ExecutionException)

Aggregations

CrtRuntimeException (software.amazon.awssdk.crt.CrtRuntimeException)37 ExecutionException (java.util.concurrent.ExecutionException)14 CompletableFuture (java.util.concurrent.CompletableFuture)13 MqttClientConnection (software.amazon.awssdk.crt.mqtt.MqttClientConnection)12 Test (org.junit.Test)11 CommandLineUtils (utils.commandlineutils.CommandLineUtils)10 MqttClientConnectionEvents (software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents)8 GetObjectOutput (com.amazonaws.s3.model.GetObjectOutput)7 ByteBuffer (java.nio.ByteBuffer)7 CredentialsProvider (software.amazon.awssdk.crt.auth.credentials.CredentialsProvider)6 List (java.util.List)5 HttpRequest (software.amazon.awssdk.crt.http.HttpRequest)5 AwsIotMqttConnectionBuilder (software.amazon.awssdk.iot.AwsIotMqttConnectionBuilder)5 Duration (java.time.Duration)3 ArrayList (java.util.ArrayList)3 CompletionException (java.util.concurrent.CompletionException)3 TlsContext (software.amazon.awssdk.crt.io.TlsContext)3 DeleteObjectOutput (com.amazonaws.s3.model.DeleteObjectOutput)2 DeleteObjectRequest (com.amazonaws.s3.model.DeleteObjectRequest)2 GetObjectRequest (com.amazonaws.s3.model.GetObjectRequest)2