public void reconnect(){
  if (opened && !allowConnectionRecovery) {
    return;
  }
  reconnectwait thread=new reconnectwait();
  thread.start();
  try {
    thread.join();
  }
 catch (  InterruptedException e) {
    log.error("Unable to join to the reconnection thread " + e.getMessage());
  }
  if (!opened) {
    log.error("Failed to re-establish connectivity");
  }
 else {
    log.info("Reconnected to " + getCurrentPortName());
    resetupConnection();
  }
}

public void reconnect ( ) { if ( opened && ! allowConnectionRecovery ) { return ; } reconnectwait thread = new reconnectwait ( ) ; thread . start ( ) ; try { thread . join ( ) ; } catch ( InterruptedException e ) { log . error ( "Unable to join to the reconnection thread " + e . getMessage ( ) ) ; } if ( ! opened ) { log . error ( "Failed to re-establish connectivity" ) ; } else { log . info ( "Reconnected to " + getCurrentPortName ( ) ) ; resetupConnection ( ) ; } }
attempts to reconnect to a failed server
