ContractAPIMqtt 类

定义

public class ContractAPIMqtt extends ProvisioningDeviceClientContract implements MqttListener
继承
java.lang.Object
ContractAPIMqtt

继承成员

构造函数

ContractAPIMqtt(ProvisioningDeviceClientConfig provisioningDeviceClientConfig)

This constructor creates an instance of Mqtt class and initializes member variables

方法

authenticateWithProvisioningService(RequestData requestData, ResponseCallback responseCallback, Object callbackContext)

Requests hub to authenticate this connection and start the registration process over MQTT

close()

Indicates to close the connection

connectionEstablished()

Called when PAHO establishes a connection to a server

connectionLost(Throwable throwable)

Called by PAHO when the connection is lost

getRegistrationStatus(RequestData requestData, ResponseCallback responseCallback, Object callbackContext)

Gets the registration status over MQTT

messageReceived(MqttMessage message)

Called when the message gets received by PAHO

open(RequestData requestData)

Indicates need to open MQTT connection

requestNonceForTPM(RequestData requestData, ResponseCallback responseCallback, Object authorizationCallbackContext)

Requests hub to provide a device key to begin authentication over MQTT (Only for TPM)

适用于