Class AwsIotDeviceCommand
java.lang.Object
com.amazonaws.services.iot.client.AWSIotMessage
com.amazonaws.services.iot.client.core.AwsIotCompletion
com.amazonaws.services.iot.client.shadow.AwsIotDeviceCommand
- All Implemented Interfaces:
AwsIotMessageCallback
This is a helper class that can be used to manage the execution result of a
shadow command, i.e. get, update, and delete. It makes sure that the command
is not published until the subscription requests for the acknowledgment
topics, namely accepted and rejected, have completed successfully.
- See Also:
-
Field Summary
Fields inherited from class com.amazonaws.services.iot.client.core.AwsIotCompletion
hasFailure, hasSuccess, hasTimeout, isAsync, request, timeout, timeoutTaskFields inherited from class com.amazonaws.services.iot.client.AWSIotMessage
errorCode, errorMessage, payload, qos, topic -
Constructor Summary
ConstructorsConstructorDescriptionAwsIotDeviceCommand(AwsIotDeviceCommandManager commandManager, AwsIotDeviceCommandManager.Command command, String commandId, AWSIotMessage request, long commandTimeout, boolean isAsync) -
Method Summary
Modifier and TypeMethodDescriptionget(AbstractAwsIotDevice device) voidCallback function to be invoked a non-block API has completed unsuccessfully.booleanonReady(AbstractAwsIotDevice device) voidCallback function to be invoked a non-block API has completed successfully.voidCallback function to be invoked a non-block API has timed out.voidput(AbstractAwsIotDevice device) voidsetResponse(AWSIotMessage response) Methods inherited from class com.amazonaws.services.iot.client.core.AwsIotCompletion
getMethods inherited from class com.amazonaws.services.iot.client.AWSIotMessage
getErrorCode, getErrorMessage, getPayload, getQos, getStringPayload, getTopic, setErrorCode, setErrorMessage, setPayload, setQos, setStringPayload, setTopic
-
Constructor Details
-
AwsIotDeviceCommand
public AwsIotDeviceCommand(AwsIotDeviceCommandManager commandManager, AwsIotDeviceCommandManager.Command command, String commandId, AWSIotMessage request, long commandTimeout, boolean isAsync)
-
-
Method Details
-
put
- Throws:
AWSIotException
-
get
-
onReady
-
onSuccess
public void onSuccess()Description copied from class:AWSIotMessageCallback function to be invoked a non-block API has completed successfully.- Specified by:
onSuccessin interfaceAwsIotMessageCallback- Overrides:
onSuccessin classAwsIotCompletion
-
onFailure
public void onFailure()Description copied from class:AWSIotMessageCallback function to be invoked a non-block API has completed unsuccessfully.- Specified by:
onFailurein interfaceAwsIotMessageCallback- Overrides:
onFailurein classAwsIotCompletion
-
onTimeout
public void onTimeout()Description copied from class:AWSIotMessageCallback function to be invoked a non-block API has timed out.- Specified by:
onTimeoutin interfaceAwsIotMessageCallback- Overrides:
onTimeoutin classAwsIotCompletion
-
getCommandManager
-
getCommand
-
getCommandId
-
getResponse
-
getRequestSent
-
setResponse
-