Methods Summary |
---|
public java.io.File[] | calculateDefaultPaths(boolean for_moving)Returns an array of size 2 indicating the appropriate locations for this
download's data files and torrent file, based on Azureus's rules regarding
default save paths, and move on completion rules.
This method takes one argument - for_moving. This essentially
indicates whether you are getting this information for purposes of just
finding where Azureus would store these files by default, or whether you
are considering moving the files from its current location.
If for_moving is false, this method will determine locations
for the download and the torrent file where Azureus would store them by
default (it may return the current paths used by this download).
If for_moving is true, then this method will consider the
download's current location, and whether it is allowed to move it - you
may not be allowed to move this download (based on Azureus's current rules)
if the download doesn't exist within a default save directory already. If
a download is complete, we consider whether we are allowed to move downloads
on completion, and whether that includes downloads outside the default save
directory.
In this case, the array may contain null indicating that the Azureus
doesn't believe that the download should be moved (based on the current rules
the user has set out). However, you are not prevented from changing the
location of the torrent file or download.
|
public boolean | canBeRemoved()Tests whether or not a download can be removed. Due to synchronization issues it is possible
for a download to report OK here but still fail removal.
|
public DownloadActivationEvent | getActivationState()Gives access to the current activation state. Note that we currently only fire the activation listener
on an increase in activation requirements. This method however gives the current view of the state
and takes into account decreases too
|
public java.lang.String | getAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute)Gets an attribute of this download. For category use the Category torrent attribute
|
public boolean | getBooleanAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute)Gets the value of the given attribute from the download. If no value is
set, then false will be returned.
|
public java.lang.String | getCategoryName()Returns the name of the Category
|
public long | getCreationTime()returns the time this download was created in milliseconds
|
public org.gudy.azureus2.plugins.disk.DiskManager | getDiskManager()Return the disk manager, null if its not running
|
public org.gudy.azureus2.plugins.disk.DiskManagerFileInfo[] | getDiskManagerFileInfo()Returns info about the torrent's files. Note that this will return "stub" values if the
download isn't running (not including info such as completion status)
|
public byte[] | getDownloadPeerId()Get the local peerID advertised to the download swarm.
|
public int | getDownloadRateLimitBytesPerSecond()Get the max download rate allowed for this download.
|
public java.lang.String | getErrorStateDetails()When the download state is ERROR this method returns the error details
|
public boolean | getFlag(long flag)Get the flag value
|
public int | getIndex()Index of download. {@link #getPosition()}
|
public int | getIntAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute)Gets the value of the given attribute from the download. If no value is
set, then 0 will be returned.
|
public DownloadAnnounceResult | getLastAnnounceResult()Gives access to the last announce result received from the tracker for the download
|
public DownloadScrapeResult | getLastScrapeResult()Gives access to the last scrape result received from the tracker for the download
|
public java.lang.String[] | getListAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute)
|
public long | getLongAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute)Gets the value of the given attribute from the download. If no value is
set, then 0 will be returned.
|
public java.util.Map | getMapAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute)
|
public int | getMaximumDownloadKBPerSecond()
|
public java.lang.String | getName()Returns the name of the torrent. Similar to Torrent.getName() and is usefull
if getTorrent() returns null and you still need the name.
|
public org.gudy.azureus2.plugins.peers.PeerManager | getPeerManager()return the current peer manager for the download.
|
public int | getPosition()Returns the current position in the queue
Completed and Incompleted downloads have seperate position sets. This means
we can have a position x for Completed, and position x for Incompleted.
|
public int | getPriority()Downloads can either be low or high priority (see PR_ constants above)
|
public java.lang.String | getSavePath()This returns the full save path for the download. If the download is a simple torrent,
this will be the full path of the file being downloaded. If the download is a multiple
file torrent, this will be the path to the directory containing all the files in the
torrent.
|
public int | getSeedingRank()The torrents with the highest rankings will be seeded first.
|
public int | getState()get state from above ST_ set
|
public DownloadStats | getStats()Gives access to the download's statistics
|
public int | getSubState()For the STOPPING state this method gives the state that is being transited too (STOPPED, QUEUED or ERROR)
|
public org.gudy.azureus2.plugins.torrent.Torrent | getTorrent()Each download has a corresponding torrent
|
public java.lang.String | getTorrentFileName()Returns the full file path and name of the .torrent file
|
public int | getUploadRateLimitBytesPerSecond()Get the max upload rate allowed for this download.
|
public boolean | hasAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute)Returns true if the download has an explicit value stored for
the given attribute.
|
public void | initialize()See lifecycle description above
|
public boolean | isChecking()When a download is completed it is rechecked (if the option is enabled). This method
returns true during this phase (at which time the status will be seeding)
|
public boolean | isComplete()Indicates if the download has completed or not, exluding any files marked
as Do No Download
|
public boolean | isComplete(boolean bIncludeDND)Indicates if the download has completed or not
|
public boolean | isForceStart()Retrieves whether the download is force started
|
public boolean | isInDefaultSaveDir()Returns true if the download is being saved to one of the default
save directories.
|
public boolean | isMessagingEnabled()Is advanced AZ messaging enabled for this download.
|
public boolean | isPaused()
|
public boolean | isPersistent()Downloads can be persistent (be remembered accross Azureus sessions), or
non-persistent.
|
public boolean | isPriorityLocked()When a download's priority is locked this means that seeding rules should not change
a downloads priority, it is under manual control
|
public boolean | isStartStopLocked()When a download is "start-stop locked" it means that seeding rules shouldn't start or
stop the download as it is under manual control
|
public void | moveDataFiles(java.io.File new_parent_dir)Move a download's data files to a new location. Download must be stopped and persistent
|
public void | moveDataFiles(java.io.File new_parent_dir, java.lang.String new_name)Move a download's data files to a new location, and rename the download at the same time.
Download must be stopped and persistent. This is equivalent to calling moveDataFiles[File]
and then renameDownload[String].
For convenience, either argument can be null, but not both.
|
public void | moveDown()Moves the download down one position
|
public void | moveTo(int position)Moves a download and re-orders the others appropriately. Note that setPosition does not do this, it
merely sets the position thus making it possible, for example, for two downloads to have the same
position
|
public void | moveTorrentFile(java.io.File new_parent_dir)Move a download's torrent file to a new location. Download must be stopped and persistent
|
public void | moveUp()Moves the download position up one
|
public void | pause()Pause the download
|
public void | recheckData()Performs a complete recheck of the downloaded data
Download must be in stopped, queued or error state
Action is performed asynchronously and will progress the download through
states PREPARING back to the relevant state
|
public void | remove()Removes a download. The download must be stopped or in error. Removal may fail if another
component does not want the removal to occur - in this case a "veto" exception is thrown
|
public void | remove(boolean delete_torrent, boolean delete_data)Same as "remove" but, if successful, deletes the torrent and/or data
|
public void | renameDownload(java.lang.String name)Renames the file (for a single file torrent) or directory (for a multi file torrent) where the
download is being saved to. The download must be in a state to move the data files to a new location
(see {@link #moveDataFiles(File)}).
This will not rename the displayed name for the torrent - if you wish to do that, you must do it via
the {@link org.gudy.azureus2.plugins.torrent.TorrentAttribute TorrentAttribute} class.
|
public void | requestTrackerAnnounce()request a tracker announce
|
public void | requestTrackerAnnounce(boolean immediate)request a tracker announce
|
public void | requestTrackerScrape(boolean immediate)request a tracker announce
|
public void | restart()See lifecycle description above
|
public void | resume()Resume the download if paused
|
public void | setAnnounceResult(DownloadAnnounceResult result)
|
public void | setAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute, java.lang.String value)Sets an attribute of this download. For category use the Category torrent attribute
|
public void | setBooleanAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute, boolean value)Sets a boolean attribute on this download.
|
public void | setCategory(java.lang.String sName)Sets the category for the download
|
public void | setDownloadRateLimitBytesPerSecond(int max_rate_bps)Set the max download rate allowed for this download.
|
public void | setFlag(long flag, boolean set)Set the flag value.
|
public void | setForceStart(boolean forceStart)Set the forcestart state of the download
|
public void | setIntAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute, int value)Sets an integer attribute on this download.
|
public void | setListAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute, java.lang.String[] value)
|
public void | setLongAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute, long value)Sets a long attribute on this download.
|
public void | setMapAttribute(org.gudy.azureus2.plugins.torrent.TorrentAttribute attribute, java.util.Map value)
|
public void | setMaximumDownloadKBPerSecond(int kb)Sets the maximum download speed in bytes per second. 0 -> unlimited
|
public void | setMessagingEnabled(boolean enabled)Enable or disable advanced AZ messaging for this download.
|
public void | setPosition(int newPosition)Sets the position in the queue
Completed and Incompleted downloads have seperate position sets
|
public void | setPriority(int priority)This method sets a download's priority
|
public void | setScrapeResult(DownloadScrapeResult result)
|
public void | setSeedingRank(int rank)The torrents with the highest rankings will be seeded first.
|
public void | setSessionAuthenticator(org.gudy.azureus2.plugins.download.session.SessionAuthenticator auth)Set the authenticator that will be used by this download to handle secure torrent session
handshaking and data encryption/decryption.
|
public void | setUploadRateLimitBytesPerSecond(int max_rate_bps)Set the max upload rate allowed for this download.
|
public void | start()See lifecycle description above
|
public void | stop()See lifecycle description above
|
public void | stopAndQueue()See lifecycle description above
|