public void broadcastList(String[] names, String broadcastName) { Namelist gaggleNameList = new Namelist(); gaggleNameList.setName(broadcastName); gaggleNameList.setSpecies(defaultSpecies); gaggleNameList.setNames(names); try { gaggleBoss.broadcastNamelist(myGaggleName, targetGoose, gaggleNameList); } catch (RemoteException rex) { System.err.println( "error rmi selecting at boss, from RShellGoose.broadcastList() " + myGaggleName); } } // broadcastList
// ------------------------------------------------------------------------------------------------------ public void handleNameList(String source, Namelist nameList) { System.out.println("pdf viewer rec'd " + nameList.getNames().length + " names"); for (int i = 0; i < nameList.getNames().length; i++) System.out.println(" " + nameList.getNames()[i]); int possibleClusterIdNumber = -1; for (int i = 0; i < nameList.getNames().length; i++) { try { possibleClusterIdNumber = Integer.parseInt(nameList.getNames()[i]); } catch (NumberFormatException ignore) { continue; } if (possibleClusterIdNumber > 0) { // System.out.println ("want to display cluster number " + possibleClusterIdNumber); String fixedName = nameList.getNames()[i]; if (possibleClusterIdNumber < 10) fixedName = "00" + nameList.getNames()[i]; else if (possibleClusterIdNumber < 100) fixedName = "0" + nameList.getNames()[i]; addNewTab(fixedName); } // if } // for i } // handleNameList
// ------------------------------------------------------------------------------------- public void handleNameList(String source, Namelist nameList) { System.out.println("nameList ready, length " + nameList.getNames().length); defaultSpecies = nameList.getSpecies(); this.nameList = nameList.getNames(); }