DeviceClientConfig 构造函数

重载

DeviceClientConfig()
DeviceClientConfig(IotHubAuthenticationProvider authenticationProvider)
DeviceClientConfig(IotHubConnectionString iotHubConnectionString)

Constructor

DeviceClientConfig(IotHubConnectionString iotHubConnectionString, ClientOptions clientOptions)
DeviceClientConfig(IotHubConnectionString iotHubConnectionString, SSLContext sslContext)
DeviceClientConfig(IotHubConnectionString iotHubConnectionString, String publicKeyCertificate, boolean isPathForPublic, String privateKey, boolean isPathForPrivate)

Constructor for device configs that use x509 authentication

DeviceClientConfig(String hostName, SasTokenProvider sasTokenProvider, ClientOptions clientOptions, String deviceId, String moduleId)

DeviceClientConfig()

protected DeviceClientConfig()

DeviceClientConfig(IotHubAuthenticationProvider authenticationProvider)

public DeviceClientConfig(IotHubAuthenticationProvider authenticationProvider)

参数

authenticationProvider
IotHubAuthenticationProvider

DeviceClientConfig(IotHubConnectionString iotHubConnectionString)

public DeviceClientConfig(IotHubConnectionString iotHubConnectionString)

Constructor

参数

iotHubConnectionString
IotHubConnectionString

is the string with the hostname, deviceId, and deviceKey or token, which identify the device in the Azure IotHub.

例外

IllegalArgumentException

if the IoT Hub hostname does not contain a valid IoT Hub name as its prefix.

DeviceClientConfig(IotHubConnectionString iotHubConnectionString, ClientOptions clientOptions)

public DeviceClientConfig(IotHubConnectionString iotHubConnectionString, ClientOptions clientOptions)

参数

iotHubConnectionString
IotHubConnectionString
clientOptions
ClientOptions

DeviceClientConfig(IotHubConnectionString iotHubConnectionString, SSLContext sslContext)

public DeviceClientConfig(IotHubConnectionString iotHubConnectionString, SSLContext sslContext)

参数

iotHubConnectionString
IotHubConnectionString
sslContext
SSLContext

DeviceClientConfig(IotHubConnectionString iotHubConnectionString, String publicKeyCertificate, boolean isPathForPublic, String privateKey, boolean isPathForPrivate)

public DeviceClientConfig(IotHubConnectionString iotHubConnectionString, String publicKeyCertificate, boolean isPathForPublic, String privateKey, boolean isPathForPrivate)

Constructor for device configs that use x509 authentication

参数

iotHubConnectionString
IotHubConnectionString

The connection string for the device. (format: "HostName=...;deviceId=...;x509=true")

publicKeyCertificate
String

The PEM encoded public key certificate or the path to the PEM encoded public key certificate file

isPathForPublic
boolean

If the provided publicKeyCertificate is a path to the actual public key certificate

privateKey
String

The PEM encoded private key or the path to the PEM encoded private key file

isPathForPrivate
boolean

If the provided privateKey is a path to the actual private key

DeviceClientConfig(String hostName, SasTokenProvider sasTokenProvider, ClientOptions clientOptions, String deviceId, String moduleId)

public DeviceClientConfig(String hostName, SasTokenProvider sasTokenProvider, ClientOptions clientOptions, String deviceId, String moduleId)

参数

hostName
String
sasTokenProvider
SasTokenProvider
clientOptions
ClientOptions
deviceId
String
moduleId
String

适用于