private void connectToServer() { try { LOG.debug("Attempting vanilla XMPP Connection to {}:{}", xmppServer, xmppPort); xmpp.connect(); if (xmpp.isConnected()) { LOG.debug("XMPP Manager successfully connected"); // Following requires a later version of the library if (xmpp.isSecureConnection()) LOG.debug("XMPP Manager successfully nogotiated a secure connection"); if (xmpp.isUsingTLS()) LOG.debug("XMPP Manager successfully nogotiated a TLS connection"); LOG.debug("XMPP Manager Connected"); login(); // Add connection listener xmpp.addConnectionListener(conlistener); } else { LOG.debug("XMPP Manager Not Connected"); } } catch (Throwable e) { LOG.error("XMPP Manager unable to connect", e); } }