MqttConnection(String hostname, String clientId, String userName, String password, SSLContext sslContext, MqttListener listener, boolean useWebSockets) 构造函数

定义

Constructor to create MqttAsync Client with Paho

public MqttConnection(String hostname, String clientId, String userName, String password, SSLContext sslContext, MqttListener listener, boolean useWebSockets)

参数

hostname
String

Uri to connect to

clientId
String

Client Id to connect to

userName
String

Username

password
String

password

sslContext
SSLContext

SSLContext for the connection

listener
MqttListener

Mqtt listener

useWebSockets
boolean

true to use Mqtt over web sockets

例外

IOException

is thrown if any of the parameters are null or empty or client cannot be instantiated

适用于