Interface IFileTransferPausable

  • All Known Implementing Classes:
    AbstractRetrieveFileTransfer, HttpClientRetrieveFileTransfer, HttpClientRetrieveFileTransfer, UrlConnectionRetrieveFileTransfer

    public interface IFileTransferPausable
    Adapter interface for pausing and resuming IFileTransfer instances that expose this adapter interface via IAdaptable.getAdapter(Class adapter). To use this interface, clients should do the following:
       IFileTransfer fileTransfer;
       IFileTransferPausable pausable = (IFileTransferPausable) fileTransfer.getAdapter(IFileTransferPausable.class);
       if (pausable !=null) {
          ... use it
       } else {
          ... does not support pausing
       }
     
    • Method Detail

      • pause

        boolean pause()
        Pause file transfer. Returns true if the associated IFileTransfer is successfully paused. Returns false if the implementing file transfer cannot be paused, or transfer has already completed.
        Returns:
        boolean true if file transfer successfully paused. False if cannot be paused, or the transfer has already completed
      • isPaused

        boolean isPaused()
        Returns:
        boolean true if file transfer paused, false if not paused
      • resume

        boolean resume()
        Resume file transfer after having been paused. If successfully resumed, then returns true. If the associated IFileShare is not already paused, or has already completed then this method returns false.
        Returns:
        boolean true if transfer is successfully resumed, false otherwise