ContractApiHttp Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. provisioning. service. contract. ContractApiHttp
- com.
public class ContractApiHttp
This client handles the Device Provisioning Service HTTP communication.
This class implements the HTTPS contract between the Provisioning Service Client and the Device Provisioning Service. It is called by the Managers that implement the Provisioning Service Client public APIs. To access the public APIs, please see the ProvisioningServiceClient.
The follow diagram describe the relation between these 3 layers of the Service Client:
+-------------------------------------------------------------------+ +------------+
| ProvisioningServiceClient | | Query |
+-----+----------------------------+--------------------------+-----+ +--+---+-----+
/ | \ | |
/ | \ | |
+------------+----------------+ +-----------+------------+ +-------------+-------------+ | |
| IndividualEnrollmentManager | | EnrollmentGroupManager | | RegistrationStatusManager | | |
+------------+--------+-------+ +-----------+------+-----+ +-------------+-------+-----+ | |
| \ | \ | \ | |
| +-----------------------------+------------------------------+-------+ |
| | | |
+------------+-------------------------------+-----------------------------+---------------------+---+
| ContractApiHttp |
+------------------------------------------------+---------------------------------------------------+
|
|
+-------------------------------------+------------------------------------------+
| com.microsoft.azure.sdk.iot.deps.transport.http |
+--------------------------------------------------------------------------------+
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Contract |
createFromConnectionString(ProvisioningConnectionString provisioningConnectionString)
Create a new instance of the Contract |
synchronized
Http |
request(HttpMethod httpMethod, String path, Map<String,String> headerParameters, String payload)
This function sends a raw information to the Device Provisioning Service service using http protocol. |
Methods inherited from java.lang.Object
Method Details
createFromConnectionString
public static ContractApiHttp createFromConnectionString(ProvisioningConnectionString provisioningConnectionString)
Create a new instance of the ContractApiHttp.
Parameters:
Returns:
ContractApiHttp
.request
public synchronized HttpResponse request(HttpMethod httpMethod, String path, Map
This function sends a raw information to the Device Provisioning Service service using http protocol.
The purpose of this function is be the base communication between the controllers and the Service, and should be used only if you have full understanding of the Device Provisioning Service rest APIs. We highly recommend that you uses the APis under ProvisioningServiceClient instead of directly access the rest API using this class.
Parameters:
Returns:
HttpResponse
that contains the response of the request.Throws:
Applies to
Azure SDK for Java