Establishes a connection to the XMPP server and performs an automatic login only if the previous connection state was logged (authenticated). It basically creates and maintains a connection to the server.
Listeners will be preserved from a previous connection if the reconnection occurs after an abrupt termination.
@throws XMPPException if an error occurs while trying to establish the connection.