IotHubConnectionString.getUrlModuleMethod 方法

定义

重载

getUrlModuleMethod(String deviceId, String moduleId)

Create url for requesting device method for module

getUrlModuleMethod(String hostName, String deviceId, String moduleId)

Create url for requesting device method for module

getUrlModuleMethod(String deviceId, String moduleId)

Create url for requesting device method for module

public URL getUrlModuleMethod(String deviceId, String moduleId)

参数

deviceId
String

The name of the device

moduleId
String

The name of the module

返回

URL

The Url in the following format: "https:hostname/twins/deviceId/methods/"

例外

MalformedURLException

This exception is thrown if the URL creation failed due to malformed string

IllegalArgumentException

This exception is thrown if device id is null or empty

getUrlModuleMethod(String hostName, String deviceId, String moduleId)

Create url for requesting device method for module

public static URL getUrlModuleMethod(String hostName, String deviceId, String moduleId)

参数

hostName
String

The hostname of the IoT Hub

deviceId
String

The name of the device

moduleId
String

The name of the module

返回

URL

The Url in the following format: "https:hostname/twins/deviceId/methods/"

例外

MalformedURLException

This exception is thrown if the URL creation failed due to malformed string

IllegalArgumentException

This exception is thrown if device id is null or empty

适用于