if(con.authinfo(username, Application.getInstance().getProperty("nntp.password"))) {
System.out.println(new Date() + ": connected");
availableConnections.push(con);
} else {
System.err.println(new Date() + ": not connected. check username/password");
throw new NntpNotConnectedException();
}
}
} catch (NumberFormatException e) {
// e.printStackTrace();
throw new NntpNotConnectedException();
} catch(UnknownHostException e) {
// e.printStackTrace();
throw new NntpNotConnectedException();
} catch (IOException e) {
// e.printStackTrace();
throw new NntpNotConnectedException();
}
}
//TODO open multiple connections
for (int i = 0; i < numberOfConnections; i++) {