private void retryBadNics(){
  if (retryNics == null)   return;
  if (!retryNics.isEmpty()) {
    String recoveredStr="network interface has recovered " + "from previous failure: {0}";
    ArrayList tmpList=(ArrayList)retryNics.clone();
    retryNics.clear();
    for (int i=0; i < tmpList.size(); i++) {
      NetworkInterface nic=(NetworkInterface)tmpList.get(i);
      try {
        sock.setNetworkInterface(nic);
        sock.joinGroup(Constants.getAnnouncementAddress());
        if (nicsToUse == NICS_USE_LIST) {
          logger.log(Level.INFO,recoveredStr,nic);
        }
 else {
          logger.log(Level.FINE,recoveredStr,nic);
        }
      }
 catch (      IOException e1) {
        retryNics.add(nic);
      }
    }
    if (retryNics.isEmpty())     retryNics=null;
  }
 else {
    try {
      sock.joinGroup(Constants.getAnnouncementAddress());
      retryNics=null;
      logger.log(Level.INFO,"system default network " + "interface has recovered from " + "previous failure");
    }
 catch (    IOException e1) {
    }
  }
}

private void retryBadNics ( ) { if ( retryNics == null ) return ; if ( ! retryNics . isEmpty ( ) ) { String recoveredStr = "network interface has recovered " + "from previous failure: {0}" ; ArrayList tmpList = ( ArrayList ) retryNics . clone ( ) ; retryNics . clear ( ) ; for ( int i = 0 ; i < tmpList . size ( ) ; i ++ ) { NetworkInterface nic = ( NetworkInterface ) tmpList . get ( i ) ; try { sock . setNetworkInterface ( nic ) ; sock . joinGroup ( Constants . getAnnouncementAddress ( ) ) ; if ( nicsToUse == NICS_USE_LIST ) { logger . log ( Level . INFO , recoveredStr , nic ) ; } else { logger . log ( Level . FINE , recoveredStr , nic ) ; } } catch ( IOException e1 ) { retryNics . add ( nic ) ; } } if ( retryNics . isEmpty ( ) ) retryNics = null ; } else { try { sock . joinGroup ( Constants . getAnnouncementAddress ( ) ) ; retryNics = null ; logger . log ( Level . INFO , "system default network " + "interface has recovered from " + "previous failure" ) ; } catch ( IOException e1 ) { } } }
convenience method that retries any previously failed interfaces .
