protected void sendAck(Node remote,Node local,NodeSecurity localSecurity,List<IncomingBatch> list,ITransportManager transportManager) throws IOException {
  Exception error=null;
  int sendAck=-1;
  int numberOfStatusSendRetries=parameterService.getInt(ParameterConstants.DATA_LOADER_NUM_OF_ACK_RETRIES);
  for (int i=0; i < numberOfStatusSendRetries && sendAck != HttpURLConnection.HTTP_OK; i++) {
    try {
      sendAck=transportManager.sendAcknowledgement(remote,list,local,localSecurity.getNodePassword(),parameterService.getRegistrationUrl());
    }
 catch (    IOException ex) {
      error=ex;
    }
catch (    RuntimeException ex) {
      error=ex;
    }
    if (sendAck != HttpURLConnection.HTTP_OK) {
      log.warn("Ack was not sent successfully on try number {}.  {}",i + 1,error != null ? error.getMessage() : "");
      if (i < numberOfStatusSendRetries - 1) {
        AppUtils.sleep(parameterService.getLong(ParameterConstants.DATA_LOADER_TIME_BETWEEN_ACK_RETRIES));
      }
 else       if (error instanceof RuntimeException) {
        throw (RuntimeException)error;
      }
 else       if (error instanceof IOException) {
        throw (IOException)error;
      }
 else {
        throw new IOException(Integer.toString(sendAck));
      }
    }
  }
}

protected void sendAck ( Node remote , Node local , NodeSecurity localSecurity , List < IncomingBatch > list , ITransportManager transportManager ) throws IOException { Exception error = null ; int sendAck = - 1 ; int numberOfStatusSendRetries = parameterService . getInt ( ParameterConstants . DATA_LOADER_NUM_OF_ACK_RETRIES ) ; for ( int i = 0 ; i < numberOfStatusSendRetries && sendAck != HttpURLConnection . HTTP_OK ; i ++ ) { try { sendAck = transportManager . sendAcknowledgement ( remote , list , local , localSecurity . getNodePassword ( ) , parameterService . getRegistrationUrl ( ) ) ; } catch ( IOException ex ) { error = ex ; } catch ( RuntimeException ex ) { error = ex ; } if ( sendAck != HttpURLConnection . HTTP_OK ) { log . warn ( "Ack was not sent successfully on try number {}.  {}" , i + 1 , error != null ? error . getMessage ( ) : "" ) ; if ( i < numberOfStatusSendRetries - 1 ) { AppUtils . sleep ( parameterService . getLong ( ParameterConstants . DATA_LOADER_TIME_BETWEEN_ACK_RETRIES ) ) ; } else if ( error instanceof RuntimeException ) { throw ( RuntimeException ) error ; } else if ( error instanceof IOException ) { throw ( IOException ) error ; } else { throw new IOException ( Integer . toString ( sendAck ) ) ; } } } }
try a configured number of times to get the ack through .
