org.mpisws.p2p.filetransfer
Class SimpleFileTransferListener
java.lang.Object
org.mpisws.p2p.filetransfer.SimpleFileTransferListener
- All Implemented Interfaces:
- FileTransferListener
public class SimpleFileTransferListener
- extends java.lang.Object
- implements FileTransferListener
Prints out the progress of the FileTransfer
- Author:
- Jeff Hoye
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleFileTransferListener
public SimpleFileTransferListener(java.lang.String prefix)
fileTransferred
public void fileTransferred(FileReceipt receipt,
long bytesTransferred,
long total,
boolean incoming)
- Specified by:
fileTransferred
in interface FileTransferListener
- Parameters:
receipt
- description of what is being transferredbytesTransferred
- the bytes that have been transferred so fartotal
- bytes that will be transferredincoming
- true if downloding, false if uploading
msgTransferred
public void msgTransferred(BBReceipt receipt,
int bytesTransferred,
int total,
boolean incoming)
- Specified by:
msgTransferred
in interface FileTransferListener
- Parameters:
receipt
- description of what is being transferredbytesTransferred
- the bytes that have been transferred so fartotal
- bytes that will be transferredincoming
- true if downloding, false if uploading
transferCancelled
public void transferCancelled(Receipt receipt,
boolean incoming)
- Specified by:
transferCancelled
in interface FileTransferListener
- Parameters:
receipt
- the item that was cancelledincoming
- true if it's a download that was cancelled, false if it was an upload that was cancelled
transferFailed
public void transferFailed(Receipt receipt,
boolean incoming)
- Specified by:
transferFailed
in interface FileTransferListener
- Parameters:
receipt
- the item that failedincoming
- true if it's a download that was cancelled, false if it was an upload that was cancelled
Copyright © 2001-2005 - Rice Pastry.