ProvisioningDeviceClient Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.provisioning.device.ProvisioningDeviceClient

public class ProvisioningDeviceClient

Method Summary

Modifier and Type Method and Description
void close()

Closes all the executors opened by the client if they have not already closed.

ProvisioningDeviceClient create(String globalEndpoint, String idScope, ProvisioningDeviceClientTransportProtocol protocol, SecurityProvider securityProvider)

Creates an instance of ProvisioningDeviceClient

void registerDevice(ProvisioningDeviceClientRegistrationCallback provisioningDeviceClientRegistrationCallback, Object context)

Register's a device with the service and provides you with iothub uri and the registered device.

void registerDevice(ProvisioningDeviceClientRegistrationCallback provisioningDeviceClientRegistrationCallback, Object context, AdditionalData additionalData)

Register's a device with the service and provides you with iothub uri and the registered device.

Method Details

close

public void close()

Closes all the executors opened by the client if they have not already closed.

create

public static ProvisioningDeviceClient create(String globalEndpoint, String idScope, ProvisioningDeviceClientTransportProtocol protocol, SecurityProvider securityProvider)

Creates an instance of ProvisioningDeviceClient

Parameters:

globalEndpoint -

global endpoint for the service to connect to. Cannot benull 

</code> . </p>

idScope -

IdScope for the instance of the service hosted by you. Cannot benull 

</code> . </p>

protocol -

Protocol to communicate with the service onto. Cannot benull 

</code> . </p>

securityProvider -

Security Provider for X509 or TPM flow. Cannot benull 

</code> . </p>

Returns:

An instance of ProvisioningDeviceClient

Throws:

ProvisioningDeviceClientException - if any of the underlying API calls fail to process.

registerDevice

public void registerDevice(ProvisioningDeviceClientRegistrationCallback provisioningDeviceClientRegistrationCallback, Object context)

Register's a device with the service and provides you with iothub uri and the registered device.

Parameters:

provisioningDeviceClientRegistrationCallback -

Callback where you can retrieve the status of registration like iothub uri and the registered device or any exception that was caused during registration process. Cannot benull 

</code> . </p>

context -

Context for the callback. Can benull 

</code> . </p>

Throws:

ProvisioningDeviceClientException - if any of the underlying API calls fail to process.

registerDevice

public void registerDevice(ProvisioningDeviceClientRegistrationCallback provisioningDeviceClientRegistrationCallback, Object context, AdditionalData additionalData)

Register's a device with the service and provides you with iothub uri and the registered device.

Parameters:

provisioningDeviceClientRegistrationCallback -

Callback where you can retrieve the status of registration like iothub uri and the registered device or any exception that was caused during registration process. Cannot benull 

</code> . </p>

context -

Context for the callback. Can benull 

</code> . </p>

additionalData - Additional data for device registration.

Throws:

ProvisioningDeviceClientException - if any of the underlying API calls fail to process.

Applies to