{
initConnection();
if(eventAdapter != null)
connection.addEventListener(eventAdapter);
session = new XmppSession(connection, true);
disco = new ServiceDiscovery(session);
new XmppPushRoster(session);
XmppUserSettings userSetting = new XmppUserSettings(host,port,domain, user, pass, AuthType.fromString(authType));
session.login(userSetting);
session.getUser().getRoster().addRosterListener(createRosterListener());
}