Package com.sshtools.client.tasks
Interface FileTransferProgress
- All Known Implementing Classes:
AbstractOptimisedTask.FileTransferProgressWrapper
public interface FileTransferProgress
Interface for monitoring the state of a file transfer
It should be noted that the total bytes to transfer passed to the started method is an indication of file length and may not be exact for some types of file transfer, for example ASCII text mode transfers may add or remove newline characters from the stream and therefore the total bytes transfered may not equal the number expected.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
The transfer has completed.default boolean
The transfer is cancelled.default void
progressed
(long bytesSoFar) The transfer has progresseddefault void
The transfer has started
-
Method Details
-
started
The transfer has started- Parameters:
bytesTotal
-file
-
-
isCancelled
default boolean isCancelled()The transfer is cancelled. Implementations should return true if the user wants to cancel the transfer. The transfer will then be stopped at the next evaluation stage.- Returns:
- boolean
-
progressed
default void progressed(long bytesSoFar) The transfer has progressed- Parameters:
bytesSoFar
-
-
completed
default void completed()The transfer has completed.
-