public void onCommandAck()

in aws-iot-device-sdk-java/src/main/java/com/amazonaws/services/iot/client/shadow/AwsIotDeviceCommandManager.java [157:182]


    public void onCommandAck(AWSIotMessage response) {
        if (response == null || response.getTopic() == null) {
            return;
        }

        AwsIotDeviceCommand command = getPendingCommand(response);
        if (command == null) {
            LOGGER.warning("Unknown command received from topic " + response.getTopic());
            return;
        }

        boolean success = response.getTopic().endsWith(COMMAND_ACK_PATHS.get(CommandAck.ACCEPTED));
        if (!success
                && (Command.DELETE.equals(command.getCommand()) && AWSIotDeviceErrorCode.NOT_FOUND.equals(command
                        .getErrorCode()))) {
            // Ignore empty document error (NOT_FOUND) for delete command
            success = true;
        }

        if (success) {
            command.setResponse(response);
            command.onSuccess();
        } else {
            command.onFailure();
        }
    }