| Modifier and Type | Field and Description |
|---|---|
protected long |
cloudToDeviceMessageCount
Number of messages received by the device
|
protected DeviceConnectionState |
connectionState
Status of the device:
{"connected" | "disconnected"}
|
protected String |
connectionStateUpdatedTime
Datetime of last time the connection state was updated.
|
protected String |
deviceId
Device name
A case-sensitive string (up to 128 char long)
of ASCII 7-bit alphanumeric chars
+ {'-', ':', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}.
|
protected String |
eTag
A string representing a weak ETAG version
of this JSON description.
|
protected String |
generationId
Device generation Id
|
protected String |
lastActivityTime
Datetime of last time the device authenticated, received, or sent a message.
|
protected String |
OFFSET_TIME_DEFAULT |
protected String |
UTC_TIME_DEFAULT |
| Modifier | Constructor and Description |
|---|---|
protected |
BaseDevice(String deviceId,
AuthenticationType authenticationType)
Create an BaseDevice instance using the given device name with the given authenticationType
|
protected |
BaseDevice(String deviceId,
SymmetricKey symmetricKey)
Create an BaseDevice instance using the given device name
|
| Modifier and Type | Method and Description |
|---|---|
AuthenticationType |
getAuthenticationType()
Getter for the authentication type of this device
|
long |
getCloudToDeviceMessageCount()
Getter for cloud to device message count
|
DeviceConnectionState |
getConnectionState()
Getter for connection state
|
String |
getConnectionStateUpdatedTime()
Getter for connection state updated time
|
String |
getDeviceId()
Getter for device name
|
String |
geteTag()
Getter for eTag
|
String |
getGenerationId()
Getter for GenerationId
|
String |
getLastActivityTime()
Getter for last activity time
|
String |
getPrimaryKey()
Getter for PrimaryKey part of the SymmetricKey
|
String |
getPrimaryThumbprint()
Getter for primary thumbprint part of the whole thumbprint
|
String |
getSecondaryKey()
Getter for SecondaryKey part of the SymmetricKey
|
String |
getSecondaryThumbprint()
Getter for secondary thumbprint part of the whole thumbprint
|
SymmetricKey |
getSymmetricKey()
Getter for SymmetricKey object
|
void |
setForceUpdate(Boolean forceUpdate)
Deprecated.
This method currently only validates forceUpdate parameter
|
void |
setSymmetricKey(SymmetricKey symmetricKey)
Setter for SymmetricKey object
|
void |
setThumbprint(String primaryThumbprint,
String secondaryThumbprint)
Deprecated.
as of service-client version 1.15.1, please use
setThumbprintFinal(String, String) |
void |
setThumbprintFinal(String primaryThumbprint,
String secondaryThumbprint)
Setter for X509 thumbprint
|
protected final String UTC_TIME_DEFAULT
protected final String OFFSET_TIME_DEFAULT
protected String deviceId
protected String generationId
protected String eTag
protected DeviceConnectionState connectionState
protected String connectionStateUpdatedTime
protected String lastActivityTime
protected long cloudToDeviceMessageCount
protected BaseDevice(String deviceId, SymmetricKey symmetricKey) throws IllegalArgumentException
deviceId - Name of the device (used as device id)symmetricKey - - Device key. If parameter is null, then the key will be auto generated.IllegalArgumentException - if deviceId is nullprotected BaseDevice(String deviceId, AuthenticationType authenticationType)
deviceId - Name of the device (used as device id)authenticationType - - The type of authentication used by this device.public String getDeviceId()
public String getGenerationId()
public SymmetricKey getSymmetricKey()
public void setSymmetricKey(SymmetricKey symmetricKey) throws IllegalArgumentException
symmetricKey - symmetricKey to be setIllegalArgumentException - if the provided symmetric key is nullpublic String getPrimaryKey()
public String getSecondaryKey()
@Deprecated public void setThumbprint(String primaryThumbprint, String secondaryThumbprint)
setThumbprintFinal(String, String)primaryThumbprint - the primary thumbprint to setsecondaryThumbprint - the secondary thumbprint to setIllegalArgumentException - if primaryThumbprint or secondaryThumbprint is null or emptypublic final void setThumbprintFinal(String primaryThumbprint, String secondaryThumbprint)
primaryThumbprint - the primary thumbprint to setsecondaryThumbprint - the secondary thumbprint to setIllegalArgumentException - if primaryThumbprint or secondaryThumbprint is null or emptypublic String getPrimaryThumbprint()
public String getSecondaryThumbprint()
public String geteTag()
public DeviceConnectionState getConnectionState()
public String getConnectionStateUpdatedTime()
public String getLastActivityTime()
public long getCloudToDeviceMessageCount()
@Deprecated public void setForceUpdate(Boolean forceUpdate) throws IllegalArgumentException
forceUpdate - - Boolean controlling if the update should be forced or notIllegalArgumentException - if the provided argument is nullpublic AuthenticationType getAuthenticationType()
Copyright © 2022. All rights reserved.