/** Sets up the transports for the given XMPPConnection */ private void prepareConnection(final Connection connection) { assert (this.connection == null); initTransports(); this.connection = connection; this.currentLocalJID = new JID(connection.getUser()); connectionPool.open(); for (ITransport transport : availableTransports) { transport.initialize(connection, byteStreamConnectionListener); } }