BaseDevice 类
定义
The BaseDevice class implementing constructors and serialization functionality.
public class BaseDevice
- 继承
-
java.lang.ObjectBaseDevice
构造函数
BaseDevice(String deviceId, AuthenticationType authenticationType) |
Create an BaseDevice instance using the given device name with the given authenticationType |
BaseDevice(String deviceId, SymmetricKey symmetricKey) |
Create an BaseDevice instance using the given device name |
字段
cloudToDeviceMessageCount |
Number of messages received by the device |
connectionState |
Status of the device: {"connected" | "disconnected"} |
connectionStateUpdatedTime |
Datetime of last time the connection state was updated. |
deviceId |
Device name A case-sensitive string (up to 128 char long) of ASCII 7-bit alphanumeric chars + {'-', ':', '.', '+', '', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}. |
eTag |
A string representing a weak ETAG version of this JSON description. This is a hash. |
generationId |
Device generation Id |
lastActivityTime |
Datetime of last time the device authenticated, received, or sent a message. |
OFFSET_TIME_DEFAULT | |
UTC_TIME_DEFAULT |
方法
getAuthenticationType() |
Getter for the authentication type of this device |
getCloudToDeviceMessageCount() |
Getter for cloud to device message count |
getConnectionState() |
Getter for connection state |
getConnectionStateUpdatedTime() |
Getter for connection state updated time |
getDeviceId() |
Getter for device name |
geteTag() |
Getter for eTag |
getGenerationId() |
Getter for GenerationId |
getLastActivityTime() |
Getter for last activity time |
getPrimaryKey() |
Getter for PrimaryKey part of the SymmetricKey |
getPrimaryThumbprint() |
Getter for primary thumbprint part of the whole thumbprint |
getSecondaryKey() |
Getter for SecondaryKey part of the SymmetricKey |
getSecondaryThumbprint() |
Getter for secondary thumbprint part of the whole thumbprint |
getSymmetricKey() |
Getter for SymmetricKey object |
setForceUpdate(Boolean forceUpdate) |
Setter for force update boolean |
setSymmetricKey(SymmetricKey symmetricKey) |
Setter for SymmetricKey object |
setThumbprint(String primaryThumbprint, String secondaryThumbprint) |
Setter for X509 thumbprint |
setThumbprintFinal(String primaryThumbprint, String secondaryThumbprint) |
Setter for X509 thumbprint |