org.xnap.transfer
Class AbstractDownload

java.lang.Object
  extended by org.xnap.transfer.AbstractTransfer
      extended by org.xnap.transfer.AbstractDownload
All Implemented Interfaces:
Download, Transfer, TransferContainer
Direct Known Subclasses:
AzureusDownloadContainer, FreewayDownload, GiFTDownloadContainer, JTellaDownloadContainer, LimeWireDownload, OpenNapDirectBrowse, OpenNapDownloadContainer, OvernetDownload

public abstract class AbstractDownload
extends AbstractTransfer
implements Download, TransferContainer

Provides a default implementation for downloads.


Field Summary
 
Fields inherited from class org.xnap.transfer.AbstractTransfer
logger, MIN_RECALC_INTERVAL, RECALC_INTERVAL, SOCKET_TIMEOUT
 
Fields inherited from interface org.xnap.transfer.Transfer
TRANSFER_TIMEOUT
 
Constructor Summary
AbstractDownload()
           
 
Method Summary
 void add(Download d)
           
 void addListListener(ListListener listener)
          Adds listener to the list of listeners.
 void clearDone()
          Asks the transfer to clear all its done children.
 int getChildCount()
           
 Transfer[] getChildren()
          Returns an array of all child Transfer objects.
 java.util.Iterator iterator()
           
 void remove(Download d)
           
 void removeListListener(ListListener listener)
          Removed listener from the list of listeners.
 
Methods inherited from class org.xnap.transfer.AbstractTransfer
addStateListener, cleared, getAverageRate, getBytesTransferred, getCurrentRate, getDescription, getElapsedTime, getFilename, getFilesize, getIcon, getQueuePosition, getRemainingTime, getSegments, removeStateListener, stateChanged, toString, transferStarted, transferStopped
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xnap.transfer.Transfer
addStateListener, cleared, getActions, getAverageRate, getCurrentRate, getDescription, getFile, getFilename, getFilesize, getIcon, getPeer, getPlugin, getQueuePosition, getRemainingTime, getSegments, getStatus, getTotalBytesTransferred, isDone, isRunning, removeStateListener
 

Constructor Detail

AbstractDownload

public AbstractDownload()
Method Detail

addListListener

public void addListListener(ListListener listener)
Description copied from interface: TransferContainer
Adds listener to the list of listeners. Listener should be notified whenever a child Transfer is added or removed.

Specified by:
addListListener in interface TransferContainer

add

public void add(Download d)

clearDone

public void clearDone()
Description copied from interface: TransferContainer
Asks the transfer to clear all its done children.

Specified by:
clearDone in interface TransferContainer

getChildCount

public int getChildCount()

getChildren

public Transfer[] getChildren()
Description copied from interface: TransferContainer
Returns an array of all child Transfer objects.

Specified by:
getChildren in interface TransferContainer

iterator

public java.util.Iterator iterator()

removeListListener

public void removeListListener(ListListener listener)
Description copied from interface: TransferContainer
Removed listener from the list of listeners.

Specified by:
removeListListener in interface TransferContainer

remove

public void remove(Download d)


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