// ------------------------------------------------------------------------------------------------------ public void connectToGaggle() { try { connector.connectToGaggle(); } catch (Exception ex0) { System.err.println("failed to connect to gaggle: " + ex0.getMessage()); ex0.printStackTrace(); } gaggleBoss = connector.getBoss(); } // connectToGaggle
// ------------------------------------------------------------------------------------- public void connectToGaggle() { try { connector.connectToGaggle(gaggleBossHostName); System.out.println("Connected to gaggle with goose name " + getName()); System.out.println("Use the disconnectFromGaggle() method to disconnect."); } catch (Exception ex0) { System.err.println("\n\n\tFailed to connect to Gaggle Boss:\n\t\t" + ex0.getMessage()); System.err.println("\n\tPossible causes: "); System.err.println("\t\t1) There is no Gaggle Boss running."); System.err.println("\t\t2) You are using an out-of-date Gaggle Boss."); System.err.println("\t\t3) Hang on a sec, a boss is probably autostarting now;"); System.err.println("\t\t\t(Wait a few moments and give the showGoose('boss') command.)"); if (verbose && !connector.getAutoStartBoss()) ex0.printStackTrace(); } gaggleBoss = connector.getBoss(); }