Interface FileUploadRegistry.IEvents

All Known Implementing Classes:
AppGyroFileUploaderService
Enclosing class:
FileUploadRegistry

public static interface FileUploadRegistry.IEvents
What the registry reports to its owner (the application-session service), on the thread the change happened on; the owner hands it to the app worker.
Author:
Christopher Mindus
  • Method Details

    • onFileCancelled

      void onFileCancelled(UploadReservation reservation, UploadFileEntry file, String reason)
      A file was cancelled (by the App, a timeout, disposal or the client); its bytes are gone.
      Parameters:
      reservation - The reservation.
      file - The file.
      reason - The reason.
    • onFileFailed

      void onFileFailed(UploadReservation reservation, UploadFileEntry file, String reason)
      A file failed; its bytes are gone.
      Parameters:
      reservation - The reservation.
      file - The file.
      reason - The reason.
    • onFilePaused

      default void onFilePaused(UploadReservation reservation, UploadFileEntry file, String reason, boolean byApp)
      A file entered UploadState.PAUSED.
      Parameters:
      reservation - The reservation.
      file - The file.
      reason - The reason given by whoever paused it.
      byApp - true if the App paused it, false if the client did.
    • onFileResumed

      default void onFileResumed(UploadReservation reservation, UploadFileEntry file, boolean byApp)
      A file left UploadState.PAUSED: every party that held it has resumed it.
      Parameters:
      reservation - The reservation.
      file - The file.
      byApp - true if the App's resume freed it, false if the client's did.
    • onAppReleased

      default void onAppReleased(UploadReservation reservation, UploadFileEntry file)
      The App resumed a file it held, but the client still holds it: the file stays paused and no onFileResumed(UploadReservation, UploadFileEntry, boolean) is given, yet the client must learn the App no longer holds it.
      Parameters:
      reservation - The reservation.
      file - The file.
    • onReservationClosed

      void onReservationClosed(UploadReservation reservation)
      Every file of the reservation is final.
      Parameters:
      reservation - The reservation.