|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.transfer.AbstractTransfer
org.xnap.transfer.AbstractDownload
org.xnap.plugin.jtella.JTellaDownloadContainer
public class JTellaDownloadContainer
Manages JTellaDownload objects.
| Field Summary |
|---|
| Fields inherited from class org.xnap.transfer.AbstractTransfer |
|---|
MIN_RECALC_INTERVAL, RECALC_INTERVAL, SOCKET_TIMEOUT |
| Fields inherited from interface org.xnap.transfer.Transfer |
|---|
TRANSFER_TIMEOUT |
| Constructor Summary | |
|---|---|
JTellaDownloadContainer(JTellaSearchResult result)
Constructs a JTellaDownload. |
|
JTellaDownloadContainer(JTellaSearchResultContainer container)
Constructs a JTellaDownload. |
|
| Method Summary | |
|---|---|
void |
add(JTellaDownload d)
|
javax.swing.Action[] |
getActions()
Returns the actions that can performed by the transfer. |
long |
getBytesTransferred()
Returns how many bytes have been transferred since the transfer was started. |
JTellaDownload |
getDownload()
|
long |
getEnqueueTime()
Returns the time when the queueable was enqueued in milli seconds. |
java.io.File |
getFile()
Returns the file the transfer is using. |
java.lang.String |
getFilename()
Returns the filename that should be presented to the user. |
long |
getFilesize()
Returns the final filesize. |
Peer |
getPeer()
Returns the peer. |
Plugin |
getPlugin()
Returns the plugin. |
int |
getPriority()
Returns 1. |
int |
getQueuePosition()
Returns the position in the DownloadManager queue. |
java.lang.String |
getStatus()
Returns the current status that should be presented to the user. |
long |
getTotalBytesTransferred()
Returns how many bytes have been transferred. |
boolean |
isDone()
Returns true if the transfer is finished. |
boolean |
isFailed()
|
boolean |
isRunning()
Returns true if the transfer is running. |
void |
setQueuePosition(int position)
Invoked by the queue to update the position. |
void |
start()
|
void |
startNextDownload()
|
boolean |
startTransfer()
Invoked by queue once the item moves to the top of the queue and is ready to run. |
| Methods inherited from class org.xnap.transfer.AbstractDownload |
|---|
add, addListListener, clearDone, getChildCount, getChildren, iterator, remove, removeListListener |
| Methods inherited from class org.xnap.transfer.AbstractTransfer |
|---|
addStateListener, cleared, getAverageRate, getCurrentRate, getDescription, getElapsedTime, getIcon, 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, getAverageRate, getCurrentRate, getDescription, getIcon, getRemainingTime, getSegments, removeStateListener |
| Constructor Detail |
|---|
public JTellaDownloadContainer(JTellaSearchResultContainer container)
JTellaDownload
objects from the results contained in container.
Sequentially tries each download until one succeeds.
public JTellaDownloadContainer(JTellaSearchResult result)
JTellaDownload
objects from the result.
| Method Detail |
|---|
public void add(JTellaDownload d)
public javax.swing.Action[] getActions()
Transfer
getActions in interface Transferpublic long getBytesTransferred()
AbstractTransfer
getBytesTransferred in class AbstractTransferAbstractTransfer.getCurrentRate()public JTellaDownload getDownload()
public long getEnqueueTime()
Queueable
getEnqueueTime in interface Queueablepublic java.io.File getFile()
Transfer
getFile in interface Transferpublic java.lang.String getFilename()
Transfer
getFilename in interface QueueablegetFilename in interface TransfergetFilename in class AbstractTransferTransfer.getFilename()public long getFilesize()
Transfer
getFilesize in interface QueueablegetFilesize in interface TransfergetFilesize in class AbstractTransferTransfer.getFilesize()public Peer getPeer()
Transfer
getPeer in interface QueueablegetPeer in interface TransferTransfer.getPeer()public Plugin getPlugin()
Transfer
getPlugin in interface Transferpublic java.lang.String getStatus()
Transfer
getStatus in interface Transferpublic long getTotalBytesTransferred()
Transfer
getTotalBytesTransferred in interface Transferpublic boolean isDone()
Transfer
isDone in interface Transferpublic boolean isFailed()
public boolean isRunning()
Transfer
isRunning in interface Transferpublic int getPriority()
getPriority in interface Queueablepublic int getQueuePosition()
DownloadManager queue.
getQueuePosition in interface QueueablegetQueuePosition in interface TransfergetQueuePosition in class AbstractTransferpublic void setQueuePosition(int position)
Queueable
setQueuePosition in interface Queueableposition - if 0, the item has been dequeued from the
queue and startQueued() has been called.public void start()
public void startNextDownload()
public boolean startTransfer()
Queueable
startTransfer in interface Queueable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||