public class IotHubConnectionString extends IotHubConnectionStringBuilder
| Modifier and Type | Field and Description |
|---|---|
protected AuthenticationMethod |
authenticationMethod |
protected static String |
HOST_NAME_PROPERTY_NAME |
protected static String |
HOST_NAME_SEPARATOR |
protected String |
hostName |
protected String |
iotHubName |
protected static String |
SHARED_ACCESS_KEY_NAME_PROPERTY_NAME |
protected static String |
SHARED_ACCESS_KEY_PROPERTY_NAME |
protected static String |
SHARED_ACCESS_SIGNATURE_PROPERTY_NAME |
protected String |
sharedAccessKey |
protected String |
sharedAccessKeyName |
protected String |
sharedAccessSignature |
protected static String |
VALUE_PAIR_DELIMITER |
protected static String |
VALUE_PAIR_SEPARATOR |
| Modifier | Constructor and Description |
|---|---|
protected |
IotHubConnectionString() |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationMethod |
getAuthenticationMethod()
Getter for authenticationMethod
|
String |
getHostName()
Getter for hostName
|
String |
getIotHubName()
Getter for iotHubName
|
String |
getSharedAccessKey()
Getter for sharedAccessKey
|
String |
getSharedAccessKeyName()
Getter for sharedAccessKeyName
|
String |
getSharedAccessSignature()
Getter for sharedAccessSignature
|
URL |
getUrlApplyConfigurationContent(String deviceId)
Create the url needed to apply some configuration content to a device
|
static URL |
getUrlApplyConfigurationContent(String hostName,
String deviceId)
Create the url needed to apply some configuration content to a device
|
URL |
getUrlConfiguration(String configurationId)
Create url for requesting configuration data
|
static URL |
getUrlConfiguration(String hostName,
String configurationId)
Create url for requesting configuration data
|
URL |
getUrlConfigurationsList(Integer maxCount)
Create url for requesting configuration data
|
static URL |
getUrlConfigurationsList(String hostName,
Integer maxCount)
Create url for requesting configuration data
|
URL |
getUrlCreateExportImportJob()
Create url for processing a bulk import/export job
|
static URL |
getUrlCreateExportImportJob(String hostName)
Create url for processing a bulk import/export job
|
URL |
getUrlDevice(String deviceId)
Create url for requesting device data
|
static URL |
getUrlDevice(String hostName,
String deviceId)
Create url for requesting device data
|
URL |
getUrlDeviceList(Integer maxCount)
Create url for requesting device list
|
static URL |
getUrlDeviceList(String hostName,
Integer maxCount)
Create url for requesting device list
|
URL |
getUrlDeviceStatistics()
Create url for requesting device statistics
|
static URL |
getUrlDeviceStatistics(String hostName)
Create url for requesting device statistics
|
URL |
getUrlImportExportJob(String jobId) |
static URL |
getUrlImportExportJob(String hostName,
String jobId) |
URL |
getUrlJobs(String jobId)
Create url for requesting jobs
|
static URL |
getUrlJobs(String hostName,
String jobId)
Create url for requesting jobs
|
URL |
getUrlJobsCancel(String jobId)
Create url for cancelling jobs
|
static URL |
getUrlJobsCancel(String hostName,
String jobId)
Create url for cancelling jobs
|
URL |
getUrlMethod(String deviceId)
Create url for requesting device method
|
static URL |
getUrlMethod(String hostName,
String deviceId)
Create url for requesting device method
|
URL |
getUrlModule(String deviceId,
String moduleId)
Create url for requesting module data
|
static URL |
getUrlModule(String hostName,
String deviceId,
String moduleId)
Create url for requesting module data
|
URL |
getUrlModuleMethod(String deviceId,
String moduleId)
Create url for requesting device method for module
|
static URL |
getUrlModuleMethod(String hostName,
String deviceId,
String moduleId)
Create url for requesting device method for module
|
URL |
getUrlModulesOnDevice(String deviceId)
Create url for requesting all modules data on a device
|
static URL |
getUrlModulesOnDevice(String hostName,
String deviceId)
Create url for requesting all modules data on a device
|
URL |
getUrlModuleTwin(String deviceId,
String moduleId)
Create url for requesting module twin
|
static URL |
getUrlModuleTwin(String hostName,
String deviceId,
String moduleId)
Create url for requesting module twin
|
URL |
getUrlQuery(String jobType,
String jobStatus)
Create url for querying
|
static URL |
getUrlQuery(String hostName,
String jobType,
String jobStatus)
Create url for querying
|
URL |
getUrlTwin(String deviceId)
Create url for requesting device twin
|
static URL |
getUrlTwin(String hostName,
String deviceId)
Create url for requesting device twin
|
URL |
getUrlTwinQuery()
Create url for querying twin
|
static URL |
getUrlTwinQuery(String hostName)
Create url for querying twin
|
String |
getUserString()
Serialize user string
|
protected void |
setSharedAccessKey(String sharedAccessKey)
Setter for sharedAccessKey
|
protected void |
setSharedAccessKeyName(String sharedAccessKeyName)
Setter for sharedAccessKeyName
|
protected void |
setSharedAccessSignature(String sharedAccessSignature)
Setter for sharedAccessSignature
|
String |
toString()
Serialize connection string
|
createConnectionString, createConnectionString, createIotHubConnectionString, createIotHubConnectionString, parse, parseIotHubName, setAuthenticationMethod, setHostName, validate, validateFormat, validateFormatIfSpecifiedprotected static final String VALUE_PAIR_DELIMITER
protected static final String VALUE_PAIR_SEPARATOR
protected static final String HOST_NAME_SEPARATOR
protected static final String HOST_NAME_PROPERTY_NAME
protected static final String SHARED_ACCESS_KEY_NAME_PROPERTY_NAME
protected static final String SHARED_ACCESS_KEY_PROPERTY_NAME
protected static final String SHARED_ACCESS_SIGNATURE_PROPERTY_NAME
protected String hostName
protected String iotHubName
protected AuthenticationMethod authenticationMethod
protected String sharedAccessKeyName
protected String sharedAccessKey
protected String sharedAccessSignature
public String getUserString()
public URL getUrlMethod(String deviceId) throws MalformedURLException, IllegalArgumentException
deviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlMethod(String hostName, String deviceId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlModuleMethod(String deviceId, String moduleId) throws MalformedURLException, IllegalArgumentException
deviceId - The name of the devicemoduleId - The name of the moduleMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlModuleMethod(String hostName, String deviceId, String moduleId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The name of the devicemoduleId - The name of the moduleMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlJobs(String jobId) throws MalformedURLException, IllegalArgumentException
jobId - is the name of the jobMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if job id is null or emptypublic static URL getUrlJobs(String hostName, String jobId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubjobId - is the name of the jobMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if job id is null or emptypublic URL getUrlTwinQuery() throws MalformedURLException
MalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic static URL getUrlTwinQuery(String hostName) throws MalformedURLException
hostName - The hostname of the IoT HubMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic URL getUrlQuery(String jobType, String jobStatus) throws MalformedURLException
jobStatus - jobStatus as StringjobType - jobType as StringMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic static URL getUrlQuery(String hostName, String jobType, String jobStatus) throws MalformedURLException
hostName - The hostname of the IoT HubjobStatus - jobStatus as StringjobType - jobType as StringMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic URL getUrlJobsCancel(String jobId) throws MalformedURLException, IllegalArgumentException
jobId - is the name of the jobMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if job id is null or emptypublic static URL getUrlJobsCancel(String hostName, String jobId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubjobId - is the name of the jobMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if job id is null or emptypublic URL getUrlTwin(String deviceId) throws MalformedURLException, IllegalArgumentException
deviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlTwin(String hostName, String deviceId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlModuleTwin(String deviceId, String moduleId) throws MalformedURLException, IllegalArgumentException
deviceId - The name of the devicemoduleId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlModuleTwin(String hostName, String deviceId, String moduleId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The name of the devicemoduleId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlDevice(String deviceId) throws MalformedURLException, IllegalArgumentException
deviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlDevice(String hostName, String deviceId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlModule(String deviceId, String moduleId) throws MalformedURLException, IllegalArgumentException
deviceId - The name of the devicemoduleId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlModule(String hostName, String deviceId, String moduleId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The name of the devicemoduleId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlApplyConfigurationContent(String deviceId) throws MalformedURLException, IllegalArgumentException
deviceId - The device to apply the configuration content toMalformedURLException - if the deviceId contains unexpected characters, and a URL cannot be constructed using itIllegalArgumentException - if deviceId is null or emptypublic static URL getUrlApplyConfigurationContent(String hostName, String deviceId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The device to apply the configuration content toMalformedURLException - if the deviceId contains unexpected characters, and a URL cannot be constructed using itIllegalArgumentException - if deviceId is null or emptypublic URL getUrlConfiguration(String configurationId) throws MalformedURLException, IllegalArgumentException
configurationId - The name of the configurationMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlConfiguration(String hostName, String configurationId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubconfigurationId - The name of the configurationMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlConfigurationsList(Integer maxCount) throws MalformedURLException, IllegalArgumentException
maxCount - The maximum number of configuration data to returnMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlConfigurationsList(String hostName, Integer maxCount) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubmaxCount - The maximum number of configuration data to returnMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlModulesOnDevice(String deviceId) throws MalformedURLException, IllegalArgumentException
deviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic static URL getUrlModulesOnDevice(String hostName, String deviceId) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubdeviceId - The name of the deviceMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if device id is null or emptypublic URL getUrlDeviceList(Integer maxCount) throws MalformedURLException, IllegalArgumentException
maxCount - The number of requested devicesMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if maxCount is null or emptypublic static URL getUrlDeviceList(String hostName, Integer maxCount) throws MalformedURLException, IllegalArgumentException
hostName - The hostname of the IoT HubmaxCount - The number of requested devicesMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringIllegalArgumentException - This exception is thrown if maxCount is null or emptypublic URL getUrlDeviceStatistics() throws MalformedURLException
MalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic static URL getUrlDeviceStatistics(String hostName) throws MalformedURLException
hostName - The hostname of the IoT HubMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic URL getUrlCreateExportImportJob() throws MalformedURLException
MalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic static URL getUrlCreateExportImportJob(String hostName) throws MalformedURLException
hostName - The hostname of the IoT HubMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic URL getUrlImportExportJob(String jobId) throws MalformedURLException
jobId - Create url for retrieving a bulk import/export jobMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic static URL getUrlImportExportJob(String hostName, String jobId) throws MalformedURLException
hostName - The hostname of the IoT HubjobId - Create url for retrieving a bulk import/export jobMalformedURLException - This exception is thrown if the URL creation failed due to malformed stringpublic String toString()
public String getIotHubName()
public AuthenticationMethod getAuthenticationMethod()
public String getSharedAccessKeyName()
public String getSharedAccessKey()
public String getSharedAccessSignature()
public String getHostName()
protected void setSharedAccessKeyName(String sharedAccessKeyName)
sharedAccessKeyName - The value of the signature to setprotected void setSharedAccessKey(String sharedAccessKey)
sharedAccessKey - The value of the signature to setprotected void setSharedAccessSignature(String sharedAccessSignature)
sharedAccessSignature - The value of the signature to setCopyright © 2022. All rights reserved.