Search in sources :

Example 1 with UpdateJobExecutionRequest

use of software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest in project aws-greengrass-nucleus by aws-greengrass.

the class IotJobsHelper method updateJobStatus.

/**
 * Subscribes to the topic which receives confirmation message of Job update for a given JobId.
 * Updates the status of an Iot Job with given JobId to a given status.
 *
 * @param jobId            The jobId to be updated
 * @param status           The {@link JobStatus} to which to update
 * @param statusDetailsMap map with job status details
 * @throws ExecutionException   if update fails
 * @throws InterruptedException if the thread gets interrupted
 * @throws TimeoutException     if the operation does not complete within the given time
 */
@SuppressWarnings("PMD.LooseCoupling")
public void updateJobStatus(String jobId, JobStatus status, HashMap<String, String> statusDetailsMap) throws ExecutionException, InterruptedException, TimeoutException {
    UpdateJobExecutionSubscriptionRequest subscriptionRequest = new UpdateJobExecutionSubscriptionRequest();
    subscriptionRequest.thingName = this.thingName;
    subscriptionRequest.jobId = jobId;
    CompletableFuture<Void> gotResponse = new CompletableFuture<>();
    iotJobsClientWrapper.SubscribeToUpdateJobExecutionAccepted(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, (response) -> {
        logger.atInfo().kv(JOB_ID_LOG_KEY_NAME, jobId).kv(STATUS_LOG_KEY_NAME, status).log(UPDATE_DEPLOYMENT_STATUS_ACCEPTED);
        gotResponse.complete(null);
    });
    iotJobsClientWrapper.SubscribeToUpdateJobExecutionRejected(subscriptionRequest, QualityOfService.AT_LEAST_ONCE, (response) -> {
        logger.atWarn().kv(JOB_ID_LOG_KEY_NAME, jobId).kv(STATUS_LOG_KEY_NAME, status).log("Job status updated rejected");
        gotResponse.completeExceptionally(new Exception(response.message));
    });
    UpdateJobExecutionRequest updateJobRequest = new UpdateJobExecutionRequest();
    updateJobRequest.jobId = jobId;
    updateJobRequest.status = status;
    updateJobRequest.statusDetails = statusDetailsMap;
    updateJobRequest.thingName = thingName;
    try {
        iotJobsClientWrapper.PublishUpdateJobExecution(updateJobRequest, QualityOfService.AT_LEAST_ONCE).get();
    } catch (ExecutionException e) {
        try {
            unwrapExecutionException(e);
        } catch (ExecutionException e1) {
            gotResponse.completeExceptionally(e1.getCause());
        } catch (TimeoutException | InterruptedException e1) {
            gotResponse.completeExceptionally(e1);
        }
    }
    try {
        gotResponse.get(mqttClient.getMqttOperationTimeoutMillis(), TimeUnit.MILLISECONDS);
    } finally {
        // Either got response, or timed out, so unsubscribe from the job topics now
        connection.unsubscribe(String.format(JOB_UPDATE_ACCEPTED_TOPIC, thingName, jobId));
        connection.unsubscribe(String.format(JOB_UPDATE_REJECTED_TOPIC, thingName, jobId));
    }
}
Also used : CompletableFuture(java.util.concurrent.CompletableFuture) UpdateJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionSubscriptionRequest) UpdateJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest) ExecutionException(java.util.concurrent.ExecutionException) TimeoutException(java.util.concurrent.TimeoutException) ServiceLoadException(com.aws.greengrass.lifecyclemanager.exceptions.ServiceLoadException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) MqttException(software.amazon.awssdk.crt.mqtt.MqttException) ExecutionException(java.util.concurrent.ExecutionException) DeviceConfigurationException(com.aws.greengrass.deployment.exceptions.DeviceConfigurationException)

Example 2 with UpdateJobExecutionRequest

use of software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest 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 3 with UpdateJobExecutionRequest

use of software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest in project aws-greengrass-nucleus by aws-greengrass.

the class IotJobsHelperTest method GIVEN_jobsClient_and_mqttConnection_WHEN_mqtt_connected_THEN_update_jobStatus_successfully.

@Test
void GIVEN_jobsClient_and_mqttConnection_WHEN_mqtt_connected_THEN_update_jobStatus_successfully() throws Exception {
    iotJobsHelper.postInject();
    String TEST_JOB_ID = "statusUpdateSuccess";
    HashMap<String, String> statusDetails = new HashMap<>();
    statusDetails.put("type", "test");
    CompletableFuture cf = new CompletableFuture();
    cf.complete(null);
    ArgumentCaptor<UpdateJobExecutionSubscriptionRequest> requestArgumentCaptor = ArgumentCaptor.forClass(UpdateJobExecutionSubscriptionRequest.class);
    when(mockIotJobsClientWrapper.PublishUpdateJobExecution(any(), any())).thenAnswer(invocationOnMock -> {
        verify(mockIotJobsClientWrapper).SubscribeToUpdateJobExecutionAccepted(requestArgumentCaptor.capture(), eq(QualityOfService.AT_LEAST_ONCE), updateJobExecutionResponseCaptor.capture());
        Consumer<UpdateJobExecutionResponse> jobResponseConsumer = updateJobExecutionResponseCaptor.getValue();
        UpdateJobExecutionResponse mockJobExecutionResponse = mock(UpdateJobExecutionResponse.class);
        jobResponseConsumer.accept(mockJobExecutionResponse);
        return cf;
    });
    iotJobsHelper.updateJobStatus(TEST_JOB_ID, JobStatus.IN_PROGRESS, statusDetails);
    verify(mockIotJobsClientWrapper).SubscribeToUpdateJobExecutionAccepted(requestArgumentCaptor.capture(), eq(QualityOfService.AT_LEAST_ONCE), updateJobExecutionResponseCaptor.capture());
    UpdateJobExecutionSubscriptionRequest actualRequest = requestArgumentCaptor.getValue();
    assertEquals(TEST_JOB_ID, actualRequest.jobId);
    assertEquals(TEST_THING_NAME, actualRequest.thingName);
    verify(mockWrapperMqttClientConnection).unsubscribe(eq(String.format(JOB_UPDATE_ACCEPTED_TOPIC, TEST_THING_NAME, TEST_JOB_ID)));
    ArgumentCaptor<UpdateJobExecutionRequest> publishRequestCaptor = ArgumentCaptor.forClass(UpdateJobExecutionRequest.class);
    verify(mockIotJobsClientWrapper).PublishUpdateJobExecution(publishRequestCaptor.capture(), eq(QualityOfService.AT_LEAST_ONCE));
    UpdateJobExecutionRequest publishRequest = publishRequestCaptor.getValue();
    assertEquals(TEST_JOB_ID, publishRequest.jobId);
    assertEquals(JobStatus.IN_PROGRESS, publishRequest.status);
    assertEquals(statusDetails, publishRequest.statusDetails);
    assertEquals(TEST_THING_NAME, publishRequest.thingName);
}
Also used : CompletableFuture(java.util.concurrent.CompletableFuture) UpdateJobExecutionResponse(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionResponse) HashMap(java.util.HashMap) UpdateJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionSubscriptionRequest) UpdateJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest) Test(org.junit.jupiter.api.Test)

Example 4 with UpdateJobExecutionRequest

use of software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest in project aws-greengrass-nucleus by aws-greengrass.

the class IotJobsHelperTest method GIVEN_jobsClient_and_mqttConnection_WHEN_mqtt_connected_THEN_update_jobStatus_failed.

@Test
void GIVEN_jobsClient_and_mqttConnection_WHEN_mqtt_connected_THEN_update_jobStatus_failed() throws Exception {
    iotJobsHelper.postInject();
    String TEST_JOB_ID = "statusUpdateFailure";
    CompletableFuture cf = new CompletableFuture();
    cf.complete(null);
    ArgumentCaptor<UpdateJobExecutionSubscriptionRequest> requestArgumentCaptor = ArgumentCaptor.forClass(UpdateJobExecutionSubscriptionRequest.class);
    when(mockIotJobsClientWrapper.PublishUpdateJobExecution(any(), any())).thenAnswer(invocationOnMock -> {
        verify(mockIotJobsClientWrapper).SubscribeToUpdateJobExecutionRejected(requestArgumentCaptor.capture(), eq(QualityOfService.AT_LEAST_ONCE), rejectedErrorCaptor.capture());
        Consumer<RejectedError> rejectedErrorConsumer = rejectedErrorCaptor.getValue();
        RejectedError mockRejectError = new RejectedError();
        mockRejectError.message = REJECTION_MESSAGE;
        rejectedErrorConsumer.accept(mockRejectError);
        return cf;
    });
    HashMap<String, String> statusDetails = new HashMap<>();
    statusDetails.put("type", "test");
    try {
        iotJobsHelper.updateJobStatus(TEST_JOB_ID, JobStatus.IN_PROGRESS, statusDetails);
    } catch (ExecutionException e) {
        // verify that exception is thrown with the expected message
        assertEquals(REJECTION_MESSAGE, e.getCause().getMessage());
    }
    UpdateJobExecutionSubscriptionRequest actualRequest = requestArgumentCaptor.getValue();
    assertEquals(TEST_JOB_ID, actualRequest.jobId);
    assertEquals(TEST_THING_NAME, actualRequest.thingName);
    verify(mockWrapperMqttClientConnection).unsubscribe(eq(String.format(JOB_UPDATE_REJECTED_TOPIC, TEST_THING_NAME, TEST_JOB_ID)));
    ArgumentCaptor<UpdateJobExecutionRequest> publishRequestCaptor = ArgumentCaptor.forClass(UpdateJobExecutionRequest.class);
    verify(mockIotJobsClientWrapper).PublishUpdateJobExecution(publishRequestCaptor.capture(), eq(QualityOfService.AT_LEAST_ONCE));
    UpdateJobExecutionRequest publishRequest = publishRequestCaptor.getValue();
    assertEquals(TEST_JOB_ID, publishRequest.jobId);
    assertEquals(JobStatus.IN_PROGRESS, publishRequest.status);
    assertEquals(statusDetails, publishRequest.statusDetails);
    assertEquals(TEST_THING_NAME, publishRequest.thingName);
}
Also used : CompletableFuture(java.util.concurrent.CompletableFuture) HashMap(java.util.HashMap) UpdateJobExecutionSubscriptionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionSubscriptionRequest) UpdateJobExecutionRequest(software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest) ExecutionException(java.util.concurrent.ExecutionException) RejectedError(software.amazon.awssdk.iot.iotjobs.model.RejectedError) Test(org.junit.jupiter.api.Test)

Aggregations

CompletableFuture (java.util.concurrent.CompletableFuture)4 UpdateJobExecutionRequest (software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionRequest)4 UpdateJobExecutionSubscriptionRequest (software.amazon.awssdk.iot.iotjobs.model.UpdateJobExecutionSubscriptionRequest)4 ExecutionException (java.util.concurrent.ExecutionException)3 HashMap (java.util.HashMap)2 Test (org.junit.jupiter.api.Test)2 RejectedError (software.amazon.awssdk.iot.iotjobs.model.RejectedError)2 DeviceConfigurationException (com.aws.greengrass.deployment.exceptions.DeviceConfigurationException)1 ServiceLoadException (com.aws.greengrass.lifecyclemanager.exceptions.ServiceLoadException)1 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 UUID (java.util.UUID)1 TimeoutException (java.util.concurrent.TimeoutException)1 CRT (software.amazon.awssdk.crt.CRT)1 CrtResource (software.amazon.awssdk.crt.CrtResource)1 CrtRuntimeException (software.amazon.awssdk.crt.CrtRuntimeException)1 Log (software.amazon.awssdk.crt.Log)1 MqttClientConnection (software.amazon.awssdk.crt.mqtt.MqttClientConnection)1 MqttClientConnectionEvents (software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents)1