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 closeNow()

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

static 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.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Method Details

closeNow

public void closeNow()

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 be null.
idScope - IdScope for the instance of the service hosted by you. Cannot be null.
protocol - Protocol to communicate with the service onto. Cannot be null.
securityProvider - Security Provider for X509 or TPM flow. Cannot be null.

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 be null.
context - Context for the callback. Can be null.

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 be null.
context - Context for the callback. Can be null.
additionalData - Additional data for device registration.

Throws:

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

Applies to