}
long now = System.currentTimeMillis();
if (wasConnected || now - _lastConnectionAttempt > (1000 * 60 * 15)) {
_lastConnectionAttempt = now;
Screenname sn = new Screenname(getScreenName());
_aimSession = new DefaultAimSession(sn);
AimConnectionProperties props = new AimConnectionProperties(sn, getPassword());
AimConnection conn = _aimSession.openConnection(props);
conn.addStateListener(new AimStateHandler());
conn.connect();