Methods Summary |
---|
public void | addActivationListener(DownloadManagerActivationListener listener)
|
public void | addDiskListener(DownloadManagerDiskListener listener)
|
public void | addListener(DownloadManagerListener listener)
|
public void | addPeerListener(DownloadManagerPeerListener listener)
|
public void | addPeerListener(DownloadManagerPeerListener listener, boolean bDispatchForExisting)
|
public void | addRateLimiter(com.aelitis.azureus.core.networkmanager.LimitedRateGroup group, boolean upload)
|
public void | addTrackerListener(DownloadManagerTrackerListener listener)
|
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 | canForceRecheck()
|
public void | destroy(boolean is_duplicate)Indicates that the download manager is no longer needed
|
public boolean | filesExist()Checks if all the files the user wants to download from this torrent
actually exist on their filesystem.
If a file does not exist, the download will be set to error state.
|
public void | forceRecheck()
|
public void | forceRecheck(ForceRecheckListener l)
|
public void | generateEvidence(org.gudy.azureus2.core3.util.IndentWriter writer)
|
public java.io.File | getAbsoluteSaveLocation()
|
public int | getActivationCount()
|
public boolean | getAssumedComplete()Retrieve whether this download is assumed complete.
Assumed complete status is kept while the torrent is in a non-running
state, even if it has no data.
When the torrent starts up, the real complete
level will be checked, and if the torrent
actually does have missing data, the download will be thrown
into error state.
Only a forced-recheck should clear this flag.
|
public long | getCreationTime()gives the time this download was created (not the torrent but the download itself)
|
public int | getCryptoLevel()
|
public PEPeer[] | getCurrentPeers()
|
public PEPiece[] | getCurrentPieces()
|
public java.lang.Object | getData(java.lang.String key)To retreive arbitrary objects against this object.
|
public DiskManager | getDiskManager()
|
public DiskManagerFileInfo[] | getDiskManagerFileInfo()
|
public java.lang.String | getDisplayName()
|
public DownloadManagerState | getDownloadState()
|
public int | getEffectiveMaxUploads()Returns the max uploads depending on whether the download is seeding and it has a separate
rate for this
|
public int | getEffectiveUploadRateLimitBytesPerSecond()returns the currently in force upload speed limit which may vary from the stats. value
as this gives the fixed per-torrent limit
|
public java.lang.String | getErrorDetails()
|
public GlobalManager | getGlobalManager()
|
public int | getHealthStatus()
|
public java.lang.String | getInternalName()returns a name based on the torrent hash or an empty string if torrent invalid
|
public int | getMaxUploads()
|
public int | getNATStatus()See plugin ConnectionManager.NAT_ constants for return values
|
public int | getNbPeers()
|
public int | getNbPieces()
|
public int | getNbSeeds()
|
public PEPeerManager | getPeerManager()
|
public java.lang.String | getPieceLength()
|
public int | getPosition()
|
public java.io.File | getSaveLocation()
|
public int | getSeedingRank()
|
public long | getSize()
|
public int | getState()
|
public DownloadManagerStats | getStats()
|
public int[] | getStorageType(DiskManagerFileInfo[] infos)
|
public int | getSubState()For stopping this returns the target state after stopping (stopped/queued)
|
public TOTorrent | getTorrent()
|
public java.lang.String | getTorrentComment()
|
public java.lang.String | getTorrentCreatedBy()
|
public long | getTorrentCreationDate()
|
public java.lang.String | getTorrentFileName()
|
public TRTrackerAnnouncer | getTrackerClient()
|
public TRTrackerScraperResponse | getTrackerScrapeResponse()
|
public java.lang.String | getTrackerStatus()
|
public int | getTrackerTime()
|
public void | initialize()
|
public boolean | isDataAlreadyAllocated()Determine whether disk allocation has already been done.
Used for checking if data is missing on a previously-loaded torrent.
|
public boolean | isDownloadComplete(boolean bIncludingDND)Retrieves whether the download is complete
|
public boolean | isExtendedMessagingEnabled()Is extended messaging enabled for this download (meaning AzMP and LTEP support).
|
public boolean | isForceStart()
|
public boolean | isInDefaultSaveDir()Returns true if the download is being saved to one of the default
save directories.
|
public boolean | isPaused()
|
public boolean | isPersistent()
|
public void | moveDataFiles(java.io.File new_parent_dir)Move data files to new location. Torrent must be in stopped/error state
|
public void | moveDataFiles(java.io.File new_parent_dir, java.lang.String new_name)Move the files and rename a download in one go.
For convenience - either argument can be null, but not both.
|
public void | moveTorrentFile(java.io.File new_parent_dir)Move torrent file to new location. Download must be stopped/error
|
public boolean | pause()
|
public void | recheckFile(DiskManagerFileInfo file)Recheck a particular file. Download must be stopped
|
public void | removeActivationListener(DownloadManagerActivationListener listener)
|
public void | removeDiskListener(DownloadManagerDiskListener listener)
|
public void | removeListener(DownloadManagerListener listener)
|
public void | removePeerListener(DownloadManagerPeerListener listener)
|
public void | removeRateLimiter(com.aelitis.azureus.core.networkmanager.LimitedRateGroup group, boolean upload)
|
public void | removeTrackerListener(DownloadManagerTrackerListener listener)
|
public void | renameDownload(java.lang.String new_name)Rename the download - this means the name of the file being downloaded (for single
file torrents), or the name of the directory holding the files (in a multi-file torrent).
This does not alter the displayed name of the download.
|
public boolean | requestAssumedCompleteMode()Will set this download to be "assumed complete" for if the download
is already complete (excluding DND)
|
public void | requestTrackerAnnounce(boolean immediate)
|
public void | requestTrackerScrape(boolean immediate)
|
public void | resetFile(DiskManagerFileInfo file)Reset the file download state to totally undownloaded. Download must be stopped
|
public void | resume()
|
public void | saveDownload()persist any general download related information, excluding resume data which is
managed separately by saveResumeData
|
public void | saveResumeData()persist resume data
|
public boolean | seedPieceRecheck()Gives the download an opportunity to schedule seeding mode piece rechecks if desired
|
public void | setAZMessagingEnabled(boolean enable)Enable or disable extended messaging messaging for this download.
|
public void | setAnnounceResult(org.gudy.azureus2.plugins.download.DownloadAnnounceResult result)
|
public void | setCreationTime(long t)
|
public void | setCryptoLevel(int level)
|
public void | setData(java.lang.String key, java.lang.Object value)To store arbitrary objects against this object.
|
public void | setDataAlreadyAllocated(boolean already_allocated)Set whether data allocation has already been done, so we know
when to allocate and when to throw a missing-data error message.
|
public void | setForceStart(boolean forceStart)
|
public void | setMaxUploads(int max_slots)
|
public void | setPieceCheckingEnabled(boolean enabled)Use with care - introduced to support speed tests whereby we want to avoid checking the
virtual torrent used for the test
|
public void | setPosition(int newPosition)
|
public void | setScrapeResult(org.gudy.azureus2.plugins.download.DownloadScrapeResult result)
|
public void | setSeedingRank(int rank)
|
public void | setStateQueued()
|
public void | setStateWaiting()
|
public void | setTorrentFileName(java.lang.String string)
|
public void | setTorrentSaveDir(java.lang.String sPath)changes the save directory. Only call this if you know what you are doing!!!!
|
public void | setTorrentSaveDir(java.lang.String parent_dir, java.lang.String dl_name)changes the save directory. Only call this if you know what you are doing!!!!
|
public void | setTrackerScrapeResponse(TRTrackerScraperResponse response)
|
public void | startDownload()
|
public void | stopIt(int stateAfterStopping, boolean remove_torrent, boolean remove_data)Stop the download manager, and do any file/torrent removals.
|