class Abort extends BaseTransform<AbortMeta, AbortData> implements ITransform<AbortMeta, AbortData> {

  @Override
  public boolean processRow() throws HopException {

    Object[] r = getRow(); // Get row from input rowset & set row busy!
    // no more input to be expected...
    if ( r == null ) {
      setOutputDone();
      return false;
    } else {
      putRow( getInputRowMeta(), r );
      nrInputRows++;
      if ( nrInputRows > nrThresholdRows ) {
        //
        // Here we abort!!
        //
        String abortOptionMessage = BaseMessages.getString( PKG, "AbortDialog.Options.Abort.Label");
        if ( meta.isAbortWithError() ) {
          abortOptionMessage = BaseMessages.getString( PKG, "AbortDialog.Options.AbortWithError.Label");
        } else if ( meta.isSafeStop() ) {
          abortOptionMessage = BaseMessages.getString( PKG, "AbortDialog.Options.SafeStop.Label");
        }
        logError( BaseMessages.getString( PKG, "Abort.Log.Wrote.AbortRow", Long.toString( nrInputRows ), abortOptionMessage, getInputRowMeta().getString( r ) ) );

        String message = environmentSubstitute( meta.getMessage() );
        if ( message == null || message.length() == 0 ) {
          logError( BaseMessages.getString( PKG, "Abort.Log.DefaultAbortMessage", "" + nrInputRows ) );
        } else {
          logError( message );
        }

        if ( meta.isAbortWithError() ) {
          setErrors( 1 );
        }
        stopAll();

      } else {
        // seen a row but not yet reached the threshold
        if ( meta.isAlwaysLogRows() ) {
          logMinimal( BaseMessages.getString(
            PKG, "Abort.Log.Wrote.Row", Long.toString( nrInputRows ), getInputRowMeta().getString( r ) ) );
        } else {
          if ( log.isRowLevel() ) {
            logRowlevel( BaseMessages.getString(
              PKG, "Abort.Log.Wrote.Row", Long.toString( nrInputRows ), getInputRowMeta().getString( r ) ) );
          }
        }
      }
    }

    return true;
  }

  public  Abort( TransformMeta transformMeta, AbortMeta meta, AbortData data, int copyNr, PipelineMeta pipelineMeta,
                Pipeline pipeline );

}