org.mpisws.p2p.filetransfer
Interface FileTransfer

All Known Implementing Classes:
FileTransferImpl

public interface FileTransfer


Method Summary
 void addListener(FileTransferListener listener)
           
 void removeListener(FileTransferListener listener)
           
 FileReceipt sendFile(File f, ByteBuffer metadata, byte priority, Continuation<FileReceipt,Exception> c)
           
 FileReceipt sendFile(File f, ByteBuffer metadata, byte priority, long offset, long length, Continuation<FileReceipt,Exception> c)
           
 BBReceipt sendMsg(ByteBuffer bb, byte priority, Continuation<BBReceipt,Exception> c)
           
 

Method Detail

sendFile

FileReceipt sendFile(File f,
                     ByteBuffer metadata,
                     byte priority,
                     long offset,
                     long length,
                     Continuation<FileReceipt,Exception> c)
                     throws IOException
Parameters:
f - the file to send
metadata - this data will be delivered to the FileAllocationStrategy and the FileTransferCallback, it can contain whatever the application needs to name the file, often a filename is sufficient.
priority - the priority of sending
offset - where to start in the file
length - how many bytes to send (must be <= fileLength-offset)
c - who to notify when it is done
Returns:
Throws:
IOException

sendFile

FileReceipt sendFile(File f,
                     ByteBuffer metadata,
                     byte priority,
                     Continuation<FileReceipt,Exception> c)
                     throws IOException
Throws:
IOException

sendMsg

BBReceipt sendMsg(ByteBuffer bb,
                  byte priority,
                  Continuation<BBReceipt,Exception> c)

addListener

void addListener(FileTransferListener listener)

removeListener

void removeListener(FileTransferListener listener)


Copyright © 2010. All Rights Reserved.