UrlPathBuilder Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.provisioning.device.internal.contract.UrlPathBuilder

public class UrlPathBuilder

Constructor Summary

Constructor Description
UrlPathBuilder(String idScope)

Constructor for Url Path builder

UrlPathBuilder(String hostName, String idScope, ProvisioningDeviceClientTransportProtocol protocol)

Constructor for Url Path builder

Method Summary

Modifier and Type Method and Description
String generateRegisterUrl(String registrationId)

Generates Register URL/Path for the specified protocol

String generateRequestUrl(String registrationId, String operationsId)

Generates Request URL/Path for the specififed protocol

String generateSasTokenUrl(String registrationId)

Generates URL Encoded SAS Token

Constructor Details

UrlPathBuilder

public UrlPathBuilder(String idScope)

Constructor for Url Path builder

Parameters:

idScope -

scope id for Provisioning service which cannot benull 

</code> or empty </p>

Throws:

IllegalArgumentException - is thrown when invalid parameters are given

UrlPathBuilder

public UrlPathBuilder(String hostName, String idScope, ProvisioningDeviceClientTransportProtocol protocol)

Constructor for Url Path builder

Parameters:

hostName -

HostName for Provisioning service which cannot benull 

</code> or empty </p>
idScope -

scope id for Provisioning service which cannot benull 

</code> or empty </p>
protocol -

One of the valid protocols. Cannot benull 

</code></p>

Throws:

IllegalArgumentException - is thrown when invalid parameters are given

Method Details

generateRegisterUrl

public String generateRegisterUrl(String registrationId)

Generates Register URL/Path for the specified protocol

Parameters:

registrationId -

Id for the registration. Cannot benull 

</code> or empty </p>

Returns:

A string of format for the specified protocol

Throws:

IOException - If string could not be generated

generateRequestUrl

public String generateRequestUrl(String registrationId, String operationsId)

Generates Request URL/Path for the specififed protocol

Parameters:

registrationId -

Id for the registration. Cannot benull 

</code> or empty </p>
operationsId -

Id for the Operation. Cannot benull 

</code> or empty </p>

Returns:

A string of format for the specified protocol

Throws:

IOException - If string could not be generated

generateSasTokenUrl

public String generateSasTokenUrl(String registrationId)

Generates URL Encoded SAS Token

Parameters:

registrationId -

Id for the registration. Cannot benull 

</code> or empty </p>

Returns:

A string of format

Applies to