Interface TransferListener

    • Method Detail

      • transferInitiated

        void transferInitiated​(TransferEvent event)
                        throws TransferCancelledException
        Notifies the listener about the initiation of a transfer. This event gets fired before any actual network access to the remote repository and usually indicates some thread is now about to perform the transfer. For a given transfer request, this event is the first one being fired and it must be emitted exactly once.
        Parameters:
        event - The event details, must not be null.
        Throws:
        TransferCancelledException - If the transfer should be aborted.
      • transferStarted

        void transferStarted​(TransferEvent event)
                      throws TransferCancelledException
        Notifies the listener about the start of a data transfer. This event indicates a successful connection to the remote repository. In case of a download, the requested remote resource exists and its size is given by TransferResource.getContentLength() if possible. This event may be fired multiple times for given transfer request if said transfer needs to be repeated (e.g. in response to an authentication challenge).
        Parameters:
        event - The event details, must not be null.
        Throws:
        TransferCancelledException - If the transfer should be aborted.
      • transferProgressed

        void transferProgressed​(TransferEvent event)
                         throws TransferCancelledException
        Notifies the listener about some progress in the data transfer. This event may even be fired if actually zero bytes have been transferred since the last event, for instance to enable cancellation.
        Parameters:
        event - The event details, must not be null.
        Throws:
        TransferCancelledException - If the transfer should be aborted.
      • transferSucceeded

        void transferSucceeded​(TransferEvent event)
        Notifies the listener about the successful completion of a transfer. This event must be fired exactly once for a given transfer request unless said request failed.
        Parameters:
        event - The event details, must not be null.