org.xnap.transfer
Class AbstractTransferManager

java.lang.Object
  extended by org.xnap.transfer.AbstractTransferManager
Direct Known Subclasses:
DownloadManager, UploadManager

public abstract class AbstractTransferManager
extends java.lang.Object

This class manages transfers.


Field Summary
protected  ListSupport listeners
           
protected  org.apache.log4j.Logger logger
           
protected static Preferences prefs
           
 
Constructor Summary
AbstractTransferManager()
           
 
Method Summary
protected  void add(Transfer t)
          Adds a transfer to this manager.
 void addListListener(ListListener listener)
           
 void clearDone()
          Removes all done transfers from this manager.
 long getCurrentRate()
          Computes the currently used bandwidth.
 TransferQueue getQueue()
           
 Transfer[] getTransfers()
           
protected  void remove(Transfer t)
          Removes t from this manager.
 void removeListListener(ListListener listener)
           
 void setAutoClearInterval(long interval)
          Sets the interval for the auto clear task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prefs

protected static Preferences prefs

logger

protected org.apache.log4j.Logger logger

listeners

protected ListSupport listeners
Constructor Detail

AbstractTransferManager

public AbstractTransferManager()
Method Detail

addListListener

public void addListListener(ListListener listener)

removeListListener

public void removeListListener(ListListener listener)

clearDone

public void clearDone()
Removes all done transfers from this manager.


getCurrentRate

public long getCurrentRate()
Computes the currently used bandwidth.

Returns:
the rate in byte / s

getQueue

public TransferQueue getQueue()

add

protected void add(Transfer t)
Adds a transfer to this manager.


getTransfers

public Transfer[] getTransfers()

remove

protected void remove(Transfer t)
Removes t from this manager.


setAutoClearInterval

public void setAutoClearInterval(long interval)
Sets the interval for the auto clear task.

Parameters:
interval - the clear interval in milli seconds; if -1, auto clearing is disabled


Copyright © 2001-2005 XNap Team. All Rights Reserved.