本文整理汇总了Java中com.amazonaws.services.iot.client.AWSIotDevice类的典型用法代码示例。如果您正苦于以下问题:Java AWSIotDevice类的具体用法?Java AWSIotDevice怎么用?Java AWSIotDevice使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AWSIotDevice类属于com.amazonaws.services.iot.client包,在下文中一共展示了AWSIotDevice类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachDevice
import com.amazonaws.services.iot.client.AWSIotDevice; //导入依赖的package包/类
public int attachDevice(AWSIotDevice device) {
try {
mqttClient.attach(device);
} catch (Exception e) {
return translateException(e);
}
return 0;
}
示例2: detachDevice
import com.amazonaws.services.iot.client.AWSIotDevice; //导入依赖的package包/类
public int detachDevice(AWSIotDevice device) {
try {
mqttClient.detach(device);
} catch (Exception e) {
return translateException(e);
}
return 0;
}
示例3: attach
import com.amazonaws.services.iot.client.AWSIotDevice; //导入依赖的package包/类
public void attach(AWSIotDevice device) throws AWSIotException {
if (devices.putIfAbsent(device.getThingName(), device) != null) {
return;
}
device.setClient(this);
// start the shadow sync task if the connection is already established
if (getConnectionStatus().equals(AWSIotConnectionStatus.CONNECTED)) {
device.activate();
}
}
示例4: detach
import com.amazonaws.services.iot.client.AWSIotDevice; //导入依赖的package包/类
public void detach(AWSIotDevice device) throws AWSIotException {
if (devices.remove(device.getThingName()) == null) {
return;
}
device.deactivate();
}
示例5: StateNode
import com.amazonaws.services.iot.client.AWSIotDevice; //导入依赖的package包/类
public StateNode(Node parent) {
super(parent, NODE_NAME);
setMaxDocumentSize(MAX_BUFFER_SIZE);
this.iotDevice = new AWSIotDevice(parent.getName());
}