code: public void collateFinalState() {
          boolean seenCanceled = false;
          for ( T download : subTransfers ) {
              if ( download.getState() == TransferState.Failed ) {
                  setState(TransferState.Failed);
                  return;
              } else if ( download.getState() == TransferState.Canceled ) {
                  seenCanceled = true;
              }
          }
          if ( seenCanceled )
              setState(TransferState.Canceled);
          else
              setState(TransferState.Completed);
      }
docs: Set the state based on the states of all file downloads. Assumes all file
  downloads are done.
  <p>
  A single failed sub-transfer makes the entire transfer failed. If there
  are no failed sub-transfers, a single canceled sub-transfer makes the
  entire transfer canceled. Otherwise, we consider ourselves Completed.