The FileTransfer API
ITransferMethodFactory \ \_.getTransferMethod | v ITransferMethod \ \ \ \ \ \.stopServing() maps "content address" to a file \ \ / \ \_.startServing(FileRequestFileMapper) \ \_.request( FileRequest, -- contains userid, "content address" INegotiationSuccessListener) / | / | / .failed(Exception) / succeeded(IFileTransfer) | status, progress, etc.
The ITransferMethodFactory may be failover, see FailoverCapableFileTransferService. Having a list of ITransferMethodFactory, when negotiation of the first fails, it tries the next ITransferMethodFactory.