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                |

               +--------------------------------------------------------------------------------+

    

  

public class ContractApiHttp
继承
java.lang.Object
ContractApiHttp

方法

createFromConnectionString(ProvisioningConnectionString provisioningConnectionString)

Create a new instance of the ContractApiHttp.

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.

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.

适用于