IotHubConnectionString 构造函数
定义
重载
IotHubConnectionString(String connectionString)
CONSTRUCTOR.
public IotHubConnectionString(String connectionString)
参数
- connectionString
- String
is the iothub connection string to parse.
例外
IllegalArgumentException
if the provided connectionString isnull
</code> , empty, or not valid or if the hostName in the connection string is not a valid URI. </p>
SecurityException
if the provided connection string contains an expired sas token
URISyntaxException
if the hostname is not a valid URI
IotHubConnectionString(String hostName, String deviceId, String sharedAccessKey, String sharedAccessToken)
Constructor.
public IotHubConnectionString(String hostName, String deviceId, String sharedAccessKey, String sharedAccessToken)
参数
- hostName
- String
the IoT Hub hostname.
- deviceId
- String
the device ID.
- sharedAccessKey
- String
the device key.
- sharedAccessToken
- String
the shared access token.
例外
IllegalArgumentException
if the IoT Hub hostname does not contain a valid IoT Hub name as its prefix or if the IoT Hub hostname does not conform to RFC 3986.
URISyntaxException
if the hostname is not a valid URI
IotHubConnectionString(String hostName, String deviceId, String sharedAccessKey, String sharedAccessToken, String gatewayHostName)
public IotHubConnectionString(String hostName, String deviceId, String sharedAccessKey, String sharedAccessToken, String gatewayHostName)
参数
- hostName
- String
- deviceId
- String
- sharedAccessKey
- String
- sharedAccessToken
- String
- gatewayHostName
- String