public class IotHubConnectionString
extends java.lang.Object
| Constructor and Description |
|---|
IotHubConnectionString(java.lang.String connectionString)
CONSTRUCTOR.
|
IotHubConnectionString(java.lang.String hostName,
java.lang.String deviceId,
java.lang.String sharedAccessKey,
java.lang.String sharedAccessToken)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDeviceId()
Getter for the deviceId.
|
java.lang.String |
getGatewayHostName() |
java.lang.String |
getHostName()
Getter for the hostName.
|
java.lang.String |
getHubName()
Getter for the hubName.
|
java.lang.String |
getModuleId() |
java.lang.String |
getSharedAccessKey()
Getter for the sharedAccessKey.
|
java.lang.String |
getSharedAccessToken()
Getter for the sharedAccessToken.
|
boolean |
isUsingX509()
Getter for UsingX509
|
void |
setSharedAccessToken(java.lang.String sharedAccessToken)
Setter for the shared access token
|
public IotHubConnectionString(java.lang.String connectionString)
throws java.lang.IllegalArgumentException
connectionString - is the iothub connection string to parse.java.lang.IllegalArgumentException - if the provided connectionString is null, empty, or not valid or if the hostName in the connection string is not a valid URI.public IotHubConnectionString(java.lang.String hostName,
java.lang.String deviceId,
java.lang.String sharedAccessKey,
java.lang.String sharedAccessToken)
throws java.lang.IllegalArgumentException
hostName - the IoT Hub hostname.deviceId - the device ID.sharedAccessKey - the device key.sharedAccessToken - the shared access token.java.lang.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.public java.lang.String getHostName()
public java.lang.String getGatewayHostName()
public java.lang.String getHubName()
public java.lang.String getDeviceId()
public java.lang.String getSharedAccessKey()
null.public java.lang.String getSharedAccessToken()
null.public java.lang.String getModuleId()
public boolean isUsingX509()
public void setSharedAccessToken(java.lang.String sharedAccessToken)
throws java.lang.IllegalArgumentException
sharedAccessToken - the new token value to setjava.lang.IllegalArgumentException - if the provided value is null or emptyCopyright © 2023. All rights reserved.