|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 Transfer
public long getBytesTransferred()
AbstractTransfer
getBytesTransferred
in class AbstractTransfer
AbstractTransfer.getCurrentRate()
public JTellaDownload getDownload()
public long getEnqueueTime()
Queueable
getEnqueueTime
in interface Queueable
public java.io.File getFile()
Transfer
getFile
in interface Transfer
public java.lang.String getFilename()
Transfer
getFilename
in interface Queueable
getFilename
in interface Transfer
getFilename
in class AbstractTransfer
Transfer.getFilename()
public long getFilesize()
Transfer
getFilesize
in interface Queueable
getFilesize
in interface Transfer
getFilesize
in class AbstractTransfer
Transfer.getFilesize()
public Peer getPeer()
Transfer
getPeer
in interface Queueable
getPeer
in interface Transfer
Transfer.getPeer()
public Plugin getPlugin()
Transfer
getPlugin
in interface Transfer
public java.lang.String getStatus()
Transfer
getStatus
in interface Transfer
public long getTotalBytesTransferred()
Transfer
getTotalBytesTransferred
in interface Transfer
public boolean isDone()
Transfer
isDone
in interface Transfer
public boolean isFailed()
public boolean isRunning()
Transfer
isRunning
in interface Transfer
public int getPriority()
getPriority
in interface Queueable
public int getQueuePosition()
DownloadManager
queue.
getQueuePosition
in interface Queueable
getQueuePosition
in interface Transfer
getQueuePosition
in class AbstractTransfer
public void setQueuePosition(int position)
Queueable
setQueuePosition
in interface Queueable
position
- 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 |