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 Summary
Modifier and TypeMethodDescriptiondefault voidonAppReleased(UploadReservation reservation, UploadFileEntry file) The App resumed a file it held, but the client still holds it: the file stays paused and noonFileResumed(UploadReservation, UploadFileEntry, boolean)is given, yet the client must learn the App no longer holds it.voidonFileCancelled(UploadReservation reservation, UploadFileEntry file, String reason) A file was cancelled (by the App, a timeout, disposal or the client); its bytes are gone.voidonFileFailed(UploadReservation reservation, UploadFileEntry file, String reason) A file failed; its bytes are gone.default voidonFilePaused(UploadReservation reservation, UploadFileEntry file, String reason, boolean byApp) A file enteredUploadState.PAUSED.default voidonFileResumed(UploadReservation reservation, UploadFileEntry file, boolean byApp) A file leftUploadState.PAUSED: every party that held it has resumed it.voidonReservationClosed(UploadReservation reservation) Every file of the reservation is final.
Method Details
onFileCancelled
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
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 enteredUploadState.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
A file leftUploadState.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
The App resumed a file it held, but the client still holds it: the file stays paused and noonFileResumed(UploadReservation, UploadFileEntry, boolean)is given, yet the client must learn the App no longer holds it.- Parameters:
reservation- The reservation.file- The file.
onReservationClosed
Every file of the reservation is final.- Parameters:
reservation- The reservation.