protected void initializeConnection(MQTTClientProvider provider) throws Exception {
  if (!isUseSSL()) {
    provider.connect("tcp://localhost:" + port);
  }
 else {
    SSLContext ctx=SSLContext.getInstance("TLS");
    ctx.init(new KeyManager[0],new TrustManager[]{new DefaultTrustManager()},new SecureRandom());
    provider.setSslContext(ctx);
    provider.connect("ssl://localhost:" + port);
  }
}

protected void initializeConnection ( MQTTClientProvider provider ) throws Exception { if ( ! isUseSSL ( ) ) { provider . connect ( "tcp://localhost:" + port ) ; } else { SSLContext ctx = SSLContext . getInstance ( "TLS" ) ; ctx . init ( new KeyManager [ 0 ] , new TrustManager [ ] { new DefaultTrustManager ( ) } , new SecureRandom ( ) ) ; provider . setSslContext ( ctx ) ; provider . connect ( "ssl://localhost:" + port ) ; } }
initialize an mqttclientprovider instance . by default this method uses the port that ' s assigned to be the tcp based port using the base version of addmqttconnector . a subclass can either change the value of port or override this method to assign the correct port .
