Rice Pastry API

org.mpisws.p2p.filetransfer
Class SimpleFileTransferListener

java.lang.Object
  extended by 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

Constructor Summary
SimpleFileTransferListener(java.lang.String prefix)
           
 
Method Summary
 void fileTransferred(FileReceipt receipt, long bytesTransferred, long total, boolean incoming)
           
 void msgTransferred(BBReceipt receipt, int bytesTransferred, int total, boolean incoming)
           
 void transferCancelled(Receipt receipt, boolean incoming)
           
 void transferFailed(Receipt receipt, boolean incoming)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleFileTransferListener

public SimpleFileTransferListener(java.lang.String prefix)
Method Detail

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 transferred
bytesTransferred - the bytes that have been transferred so far
total - bytes that will be transferred
incoming - 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 transferred
bytesTransferred - the bytes that have been transferred so far
total - bytes that will be transferred
incoming - 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 cancelled
incoming - 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 failed
incoming - true if it's a download that was cancelled, false if it was an upload that was cancelled

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection