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(java.io.File f,
java.nio.ByteBuffer metadata,
byte priority,
Continuation<FileReceipt,java.lang.Exception> c)
|
FileReceipt |
sendFile(java.io.File f,
java.nio.ByteBuffer metadata,
byte priority,
long offset,
long length,
Continuation<FileReceipt,java.lang.Exception> c)
|
BBReceipt |
sendMsg(java.nio.ByteBuffer bb,
byte priority,
Continuation<BBReceipt,java.lang.Exception> c)
|
sendFile
FileReceipt sendFile(java.io.File f,
java.nio.ByteBuffer metadata,
byte priority,
long offset,
long length,
Continuation<FileReceipt,java.lang.Exception> c)
throws java.io.IOException
- Parameters:
f
- the file to sendmetadata
- 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 sendingoffset
- where to start in the filelength
- how many bytes to send (must be <= fileLength-offset)c
- who to notify when it is done
- Returns:
-
- Throws:
java.io.IOException
sendFile
FileReceipt sendFile(java.io.File f,
java.nio.ByteBuffer metadata,
byte priority,
Continuation<FileReceipt,java.lang.Exception> c)
throws java.io.IOException
- Throws:
java.io.IOException
sendMsg
BBReceipt sendMsg(java.nio.ByteBuffer bb,
byte priority,
Continuation<BBReceipt,java.lang.Exception> c)
addListener
void addListener(FileTransferListener listener)
removeListener
void removeListener(FileTransferListener listener)
Copyright © 2001-2005 - Rice Pastry.