Interface IFileTransferRateControl


  • public interface IFileTransferRateControl
    Adapter for setting rate control on IFileTransferInfo instances that expose expose this adapter interface via IAdaptable.getAdapter(Class adapter). To use this interface, clients should do the following:
       IFileTransfer fileTransfer;
       IFileTransferRateControl rateController = (IFileTransferRateControl) fileTransfer.getAdapter(IFileTransferRateControl.class);
       if (rateController !=null) {
          ... use it
       } else {
          ... does not support rate control
       }
     
    • Method Detail

      • setMaxDownloadSpeed

        void setMaxDownloadSpeed​(long maxDownloadSpeed)
        Set maximum download speed in bytes/second. Specifying a maximum download speed of 0 indicates that any exiting rate cap should be removed, and the transfer should proceed as fast as possible a
        Parameters:
        maxDownloadSpeed - in bytes/second
      • setMaxUploadSpeed

        void setMaxUploadSpeed​(long maxUploadSpeed)
        Set maximum upload speed in bytes/second. Specifying a maximum upload speed of 0 indicates that any exiting rate cap should be removed, and the transfer should proceed as fast as possible
        Parameters:
        maxUploadSpeed - in bytes/second