ContractAPIHttp Class
- java.
lang. Object - ProvisioningDeviceClientContract
- com.
microsoft. azure. sdk. iot. provisioning. device. internal. contract. http. ContractAPIHttp
- com.
public class ContractAPIHttp extends ProvisioningDeviceClientContract
Constructor Summary
Constructor | Description |
---|---|
ContractAPIHttp(ProvisioningDeviceClientConfig provisioningDeviceClientConfig) |
Constructor for Contract API HTTP |
Method Summary
Modifier and Type | Method and Description |
---|---|
synchronized void |
authenticateWithProvisioningService(RequestData requestData, ResponseCallback responseCallback, Object dpsAuthorizationCallbackContext)
Requests hub to authenticate this connection and start the registration process over HTTP |
void | close() |
String | getConnectionId() |
String | getHostName() |
synchronized void |
getRegistrationStatus(RequestData requestData, ResponseCallback responseCallback, Object dpsAuthorizationCallbackContext)
Gets the registration status over HTTP |
void | open(RequestData requestData) |
synchronized void |
requestNonceForTPM(RequestData requestData, ResponseCallback responseCallback, Object dpsAuthorizationCallbackContext)
Requests hub to provide a device key to begin authentication over HTTP (Only for TPM) |
Inherited Members
Constructor Details
ContractAPIHttp
public ContractAPIHttp(ProvisioningDeviceClientConfig provisioningDeviceClientConfig)
Constructor for Contract API HTTP
Parameters:
Config used for provisioning Cannot benull
</code> . </p>
Throws:
ProvisioningDeviceClientException
- is thrown when any of the input parameters are invalid
Method Details
authenticateWithProvisioningService
public synchronized void authenticateWithProvisioningService(RequestData requestData, ResponseCallback responseCallback, Object dpsAuthorizationCallbackContext)
Requests hub to authenticate this connection and start the registration process over HTTP
Parameters:
requestData
- A nonnull
</code> value with all the required request data </p>
responseCallback
- A nonnull
</code> value for the callback </p>
dpsAuthorizationCallbackContext
- An object for context. Can benull
</code></p>
Throws:
ProvisioningDeviceClientException
- If any of the parameters are invalid (null
</code> or empty) </p>
ProvisioningDeviceTransportException
- If any of the API calls to transport fail
ProvisioningDeviceHubException
- If hub responds back with status other than 300 or less
close
public void close()
getConnectionId
public String getConnectionId()
getHostName
public String getHostName()
getRegistrationStatus
public synchronized void getRegistrationStatus(RequestData requestData, ResponseCallback responseCallback, Object dpsAuthorizationCallbackContext)
Gets the registration status over HTTP
Parameters:
requestData
- A nonnull
</code> value with all the request data </p>
responseCallback
- A nonnull
</code> value for the callback </p>
dpsAuthorizationCallbackContext
- An object for context. Can benull
</code></p>
Throws:
ProvisioningDeviceClientException
- If any of the parameters are invalid (null
</code> or empty) </p>
ProvisioningDeviceTransportException
- If any of the API calls to transport fail
ProvisioningDeviceHubException
- If hub responds back with status other than 300 or less.
open
public void open(RequestData requestData)
Parameters:
requestData
requestNonceForTPM
public synchronized void requestNonceForTPM(RequestData requestData, ResponseCallback responseCallback, Object dpsAuthorizationCallbackContext)
Requests hub to provide a device key to begin authentication over HTTP (Only for TPM)
Parameters:
requestData
- A nonnull
</code> value with all the required request data </p>
responseCallback
- A nonnull
</code> value for the callback </p>
dpsAuthorizationCallbackContext
- An object for context. Can benull
</code></p>
Throws:
ProvisioningDeviceClientException
- If any of the parameters are invalid (null
</code> or empty) </p>
ProvisioningDeviceTransportException
- If any of the API calls to transport fail
ProvisioningDeviceHubException
- If hub responds back with status other than 300 or less
Applies to