This class IMqttClient()
allows you to create a client
object with a callback to all possible events to happen, for an example
@Override
public void subscribe(String arg0) throws MqttException, MqttSecurityException {
// TODO Auto-generated method stub
}
@Override
public void setCallback(MqttCallback arg0) {
// TODO Auto-generated method stub
}
@Override
public void publish(String arg0, byte[] arg1, int arg2, boolean arg3) throws MqttException, MqttPersistenceException {
// TODO Auto-generated method stub
}
But this class does not allow you to specify an ID
for each client. How that is possible? especially if you want to connect with clean session = false
?
Also, i have checked the class MqttConnectOptions
when you instantiate an object you can set the server URI
as an option and later you can do something like that client.connect(opts)
, but there is no way to specify the ID
.