Rice Pastry API

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)
           
 

Method Detail

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 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:
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)

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection