Interface FileTransferManager

  • All Superinterfaces:
    Module
    All Known Implementing Classes:
    DefaultFileTransferManager

    public interface FileTransferManager
    extends Module
    Manages all file transfer currently happening originating from and/or ending at users of the server. From here, file transfers can be administered and stats can be tracked.
    Author:
    Alexander Wenckus
    • Method Detail

      • acceptIncomingFileTransferRequest

        boolean acceptIncomingFileTransferRequest​(FileTransfer transfer)
                                           throws FileTransferRejectedException
        Checks an incoming file transfer request to see if it should be accepted or rejected. If it is accepted true will be returned and if it is rejected false will be returned.
        Parameters:
        transfer - the transfer to test for acceptance
        Returns:
        true if it should be accepted false if it should not.
        Throws:
        FileTransferRejectedException - if the request was rejected (can this ever happen?)
      • registerProxyTransfer

        void registerProxyTransfer​(String transferDigest,
                                   ProxyTransfer proxyTransfer)
                            throws UnauthorizedException
        Registers that a transfer has begun through the proxy connected to the server.
        Parameters:
        transferDigest - the digest of the initiator + target + sessionID that uniquely identifies a file transfer
        proxyTransfer - the related proxy transfer.
        Throws:
        UnauthorizedException - when in the current server configuration this transfer should not be permitted.
      • addListener

        void addListener​(FileTransferEventListener eventListener)
        Registers an event listener that will be notified of file transfer related events.
        Parameters:
        eventListener - an event listener (cannot be null).
      • removeListener

        void removeListener​(FileTransferEventListener eventListener)
        Unregisters an event listener from the list of event listeners that are notified of file transfer related events.
        Parameters:
        eventListener - an event listener (cannot be null).
      • fireFileTransferCompleted

        void fireFileTransferCompleted​(String sid,
                                       boolean wasSuccessful)
        Parameters:
        sid - The session id of the file transfer that is being intercepted (cannot be null).
        wasSuccessful - false when an exception was thrown during file transfer, otherwise true.