Class AwsIotDeviceCommandManager
- java.lang.Object
-
- com.amazonaws.services.iot.client.shadow.AwsIotDeviceCommandManager
-
public class AwsIotDeviceCommandManager extends Object
This class manages the commands sent to the shadow. It maintains a list of pending commands that are yet to be accepted or rejected by the shadow. Upon receiving the shadow response for a command, it will notify therefore resume the execution of the caller.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAwsIotDeviceCommandManager.Commandstatic classAwsIotDeviceCommandManager.CommandAck
-
Constructor Summary
Constructors Constructor Description AwsIotDeviceCommandManager(AbstractAwsIotDevice device)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractAwsIotDevicegetDevice()com.fasterxml.jackson.databind.ObjectMappergetObjectMapper()ConcurrentMap<String,AwsIotDeviceCommand>getPendingCommands()StringgetTopic(AwsIotDeviceCommandManager.Command command, AwsIotDeviceCommandManager.CommandAck ack)booleanisDeltaTopic(String topic)voidonCommandAck(AWSIotMessage response)voidonCommandTimeout(AwsIotDeviceCommand command)voidonDeactivate()voidonSubscriptionAck(String topic, boolean success)StringrunCommand(AwsIotDeviceCommandManager.Command command, AWSIotMessage request, long commandTimeout)StringrunCommand(AwsIotDeviceCommandManager.Command command, AWSIotMessage request, long commandTimeout, boolean isAsync)StringrunCommandSync(AwsIotDeviceCommandManager.Command command, AWSIotMessage request)StringrunCommandSync(AwsIotDeviceCommandManager.Command command, AWSIotMessage request, long commandTimeout)
-
-
-
Constructor Detail
-
AwsIotDeviceCommandManager
public AwsIotDeviceCommandManager(AbstractAwsIotDevice device)
-
-
Method Detail
-
getTopic
public String getTopic(AwsIotDeviceCommandManager.Command command, AwsIotDeviceCommandManager.CommandAck ack)
-
runCommandSync
public String runCommandSync(AwsIotDeviceCommandManager.Command command, AWSIotMessage request) throws AWSIotException
- Throws:
AWSIotException
-
runCommandSync
public String runCommandSync(AwsIotDeviceCommandManager.Command command, AWSIotMessage request, long commandTimeout) throws AWSIotException, AWSIotTimeoutException
-
runCommand
public String runCommand(AwsIotDeviceCommandManager.Command command, AWSIotMessage request, long commandTimeout) throws AWSIotException
- Throws:
AWSIotException
-
runCommand
public String runCommand(AwsIotDeviceCommandManager.Command command, AWSIotMessage request, long commandTimeout, boolean isAsync) throws AWSIotException, AWSIotTimeoutException
-
onCommandAck
public void onCommandAck(AWSIotMessage response)
-
onCommandTimeout
public void onCommandTimeout(AwsIotDeviceCommand command)
-
onSubscriptionAck
public void onSubscriptionAck(String topic, boolean success)
-
onDeactivate
public void onDeactivate()
-
isDeltaTopic
public boolean isDeltaTopic(String topic)
-
getPendingCommands
public ConcurrentMap<String,AwsIotDeviceCommand> getPendingCommands()
-
getDevice
public AbstractAwsIotDevice getDevice()
-
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
-
-