Skip to main content

Interface FileUploadListener


public interface FileUploadListener
This interface provides callback methods for - a. complete multi-part file upload b. a part of multi-part upload c. a complete single shot upload of multiple files An example usage can be as given below :
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method is called when a single shot complete upload has been completed.
    default void
    This method is called when a multi-part upload was aborted because an earlier stage of the job failed.
    void
    This method is called when all the parts of a multi-part upload have been completed successfully.
    void
    This method is called whenever any part of a multi-part upload has been completed.
  • Method Details

    • onMultiPartUploadComplete

      void onMultiPartUploadComplete(List<Result> uploadResults)
      This method is called when all the parts of a multi-part upload have been completed successfully.

      The list contains a Result for every stage of the job, in the order they were executed: the initiating stage, one entry per uploaded part, and finally the completing stage. Only the completing stage reports the uploaded file through Result.getFullFileNames(); for the other stages that list is empty. Use Result.getUploadInfo() to tell the stages apart.

      Parameters:
      uploadResults - - List of Result objects, one per stage.
    • onMultiPartUploadCancel

      default void onMultiPartUploadCancel(List<Result> uploadResults)
      This method is called when a multi-part upload was aborted because an earlier stage of the job failed. It is never the result of an explicit request to cancel, as no such operation is exposed.

      The list contains a Result for every stage that completed before the failure, followed by the cancelling stage; none of them report an uploaded file, since nothing was committed. This callback is purely informational — the failure is also reported to the caller of the upload method as a thrown GPUdbException, which remains the authoritative error channel.

      Parameters:
      uploadResults - - List of Result objects, one per stage.
    • onPartUpload

      void onPartUpload(Result result)
      This method is called whenever any part of a multi-part upload has been completed. This could be useful for getting information about how many parts out of the total number of parts have been completed.
      Parameters:
      result - - a Result object
    • onFullFileUpload

      void onFullFileUpload(Result result)
      This method is called when a single shot complete upload has been completed.
      Parameters:
      result - - a list of file names