org.gudy.azureus2.core3.download
Interface DownloadManager

All Superinterfaces:
Taggable
All Known Implementing Classes:
DownloadManagerImpl

public interface DownloadManager
extends Taggable


Field Summary
static int ET_INSUFFICIENT_SPACE
           
static int ET_NONE
           
static int ET_OTHER
           
static int STATE_ALLOCATING
           
static int STATE_CHECKING
           
static int STATE_CLOSED
           
static int STATE_DOWNLOADING
           
static int STATE_ERROR
           
static int STATE_FINISHING
           
static int STATE_INITIALIZED
           
static int STATE_INITIALIZING
           
static int STATE_QUEUED
           
static int STATE_READY
           
static int STATE_SEEDING
           
static int STATE_START_OF_DAY
           
static int STATE_STOPPED
           
static int STATE_STOPPING
           
static int STATE_WAITING
           
static int WEALTH_ERROR
           
static int WEALTH_KO
           
static int WEALTH_NO_REMOTE
           
static int WEALTH_NO_TRACKER
           
static int WEALTH_OK
           
static int WEALTH_STOPPED
           
 
Fields inherited from interface com.aelitis.azureus.core.tag.Taggable
TT_DOWNLOAD, TT_PEER
 
Method Summary
 void addActivationListener(DownloadManagerActivationListener listener)
           
 void addDiskListener(DownloadManagerDiskListener listener)
           
 void addListener(DownloadManagerListener listener)
           
 void addListener(DownloadManagerListener listener, boolean triggerStateChange)
           
 void addPeerListener(DownloadManagerPeerListener listener)
           
 void addPeerListener(DownloadManagerPeerListener listener, boolean bDispatchForExisting)
           
 void addPieceListener(DownloadManagerPieceListener listener)
           
 void addPieceListener(DownloadManagerPieceListener listener, boolean bDispatchForExisting)
           
 void addRateLimiter(LimitedRateGroup group, boolean upload)
           
 void addTPSListener(DownloadManagerTPSListener listener)
           
 void addTrackerListener(DownloadManagerTrackerListener listener)
           
 boolean canForceRecheck()
           
 boolean canMoveDataFiles()
           
 void copyDataFiles(java.io.File parent_dir)
           
 void destroy(boolean is_duplicate)
          Indicates that the download manager is no longer needed
 boolean filesExist()
          Deprecated. Use filesExist(boolean) - to be removed when EMP dependency removed
 boolean filesExist(boolean expected_to_be_allocated)
          Checks if all the files the user wants to download from this torrent actually exist on their filesystem.
 void fireGlobalManagerEvent(int event_type)
           
 void forceRecheck()
           
 void forceRecheck(ForceRecheckListener l)
           
 void generateEvidence(IndentWriter writer)
           
 java.io.File getAbsoluteSaveLocation()
          Returns the file location where we save the torrent, this includes the parent directory and the actual file name.
 int getActivationCount()
           
 boolean getAssumedComplete()
          Retrieve whether this download is assumed complete.
 long getAutoResumeTime()
           
 long getCreationTime()
          gives the time this download was created (not the torrent but the download itself)
 int getCryptoLevel()
           
 PEPeer[] getCurrentPeers()
           
 PEPiece[] getCurrentPieces()
           
 java.lang.Object getData(java.lang.String key)
          Deprecated. Use getUserData
 DiskManager getDiskManager()
           
 DiskManagerFileInfo[] getDiskManagerFileInfo()
          Deprecated. use getDiskManagerFileInfoSet() instead
 DiskManagerFileInfoSet getDiskManagerFileInfoSet()
           
 java.lang.String getDisplayName()
           
 DownloadManagerState getDownloadState()
           
 int getEffectiveMaxUploads()
          Returns the max uploads depending on whether the download is seeding and it has a separate rate for this
 int getEffectiveUploadRateLimitBytesPerSecond()
          returns the currently in force upload speed limit which may vary from the stats.
 java.lang.String getErrorDetails()
           
 int getErrorType()
           
 int getExtendedMessagingMode()
           
 GlobalManager getGlobalManager()
           
 java.util.List<TRTrackerScraperResponse> getGoodTrackerScrapeResponses()
           
 int getHealthStatus()
           
 java.lang.String getInternalName()
          returns a name based on the torrent hash or an empty string if torrent invalid
 int getMaxUploads()
           
 int getNATStatus()
          See plugin ConnectionManager.NAT_ constants for return values
 int getNbPeers()
           
 int getNbPieces()
           
 int getNbSeeds()
           
 int getNumFileInfos()
           
 PEPeerManager getPeerManager()
           
 java.lang.String getPieceLength()
           
 int getPosition()
           
 LimitedRateGroup[] getRateLimiters(boolean upload)
           
 java.io.File getSaveLocation()
           
 int getSeedingRank()
           
 long getSize()
           
 int getState()
           
 DownloadManagerStats getStats()
           
 int[] getStorageType(DiskManagerFileInfo[] infos)
           
 int getSubState()
          For stopping this returns the target state after stopping (stopped/queued)
 TOTorrent getTorrent()
           
 java.lang.String getTorrentComment()
           
 java.lang.String getTorrentCreatedBy()
           
 long getTorrentCreationDate()
           
 java.lang.String getTorrentFileName()
          This includes the full path to the torrent file.
 TRTrackerAnnouncer getTrackerClient()
           
 java.util.List<TrackerPeerSource> getTrackerPeerSources()
           
 TRTrackerScraperResponse getTrackerScrapeResponse()
           
 java.lang.String getTrackerStatus()
           
 int getTrackerTime()
          When the next call to the tracker will occur (in seconds)
 java.lang.Object getUserData(java.lang.Object key)
           
 void initialize()
           
 boolean isDataAlreadyAllocated()
          Determine whether disk allocation has already been done.
 boolean isDestroyed()
           
 boolean isDownloadComplete(boolean bIncludingDND)
          Retrieves whether the download is complete
 boolean isForceStart()
           
 boolean isInDefaultSaveDir()
          Returns true if the download is being saved to one of the default save directories.
 boolean isPaused()
           
 boolean isPersistent()
           
 java.lang.String isSwarmMerging()
           
 boolean isTrackerError()
           
 boolean isUnauthorisedOnTracker()
           
 void moveDataFiles(java.io.File new_parent_dir)
          Move data files to new location.
 void moveDataFiles(java.io.File new_parent_dir, java.lang.String new_name)
          Move the files and rename a download in one go.
 void moveDataFilesLive(java.io.File new_parent_dir)
          At some point someone made the file-move operations stop+restart the download when it was designed to work without doing this (see move-on-complete for example).
 void moveTorrentFile(java.io.File new_parent_dir)
          Move torrent file to new location.
 void moveTorrentFile(java.io.File parent_dir, java.lang.String new_name)
           
 boolean pause()
           
 boolean pause(long auto_resume_time)
           
 void recheckFile(DiskManagerFileInfo file)
          Recheck a particular file.
 void removeActivationListener(DownloadManagerActivationListener listener)
           
 void removeDiskListener(DownloadManagerDiskListener listener)
           
 void removeListener(DownloadManagerListener listener)
           
 void removePeerListener(DownloadManagerPeerListener listener)
           
 void removePieceListener(DownloadManagerPieceListener listener)
           
 void removeRateLimiter(LimitedRateGroup group, boolean upload)
           
 void removeTPSListener(DownloadManagerTPSListener listener)
           
 void removeTrackerListener(DownloadManagerTrackerListener listener)
           
 void rename(java.lang.String new_name)
          Renames the save file, torrent file and the displayed name.
 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).
 void renameTorrent(java.lang.String new_name)
           
 void renameTorrentSafe(java.lang.String name)
          Same as renameTorrent, but appends numbers if torrent already exists
 boolean requestAssumedCompleteMode()
          Will set this download to be "assumed complete" for if the download is already complete (excluding DND)
 void requestAttention()
           
 void requestTrackerAnnounce(boolean immediate)
           
 void requestTrackerScrape(boolean immediate)
           
 void resetFile(DiskManagerFileInfo file)
          Reset the file download state to totally undownloaded.
 void resume()
           
 void saveDownload()
          persist any general download related information, excluding resume data which is managed separately by saveResumeData
 void saveResumeData()
          persist resume data
 boolean seedPieceRecheck()
          Gives the download an opportunity to schedule seeding mode piece rechecks if desired
 void setAnnounceResult(DownloadAnnounceResult result)
           
 void setCreationTime(long t)
           
 void setCryptoLevel(int level)
           
 void setData(java.lang.String key, java.lang.Object value)
          Deprecated. @deprecated Use setUserData
 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.
 void setFilePriorities(DiskManagerFileInfo[] fileInfos, int type)
          Sets the priority for an array for files
 void setForceStart(boolean forceStart)
           
 void setMaxUploads(int max_slots)
           
 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
 void setPosition(int newPosition)
           
 void setScrapeResult(DownloadScrapeResult result)
           
 void setSeedingRank(int rank)
           
 void setStateQueued()
           
 void setStateWaiting()
           
 void setTorrentFile(java.io.File new_parent_dir, java.lang.String new_name)
          Sets the torrent file name (will perform a move of the torrent file) - this shouldn't be used unless you know what you are doing (it requires the download to be stopped!) - it is safer to use moveTorrentFile instead.
 void setTorrentFileName(java.lang.String string)
           
 void setTorrentSaveDir(java.lang.String sPath)
          changes the save directory.
 void setTorrentSaveDir(java.lang.String parent_dir, java.lang.String dl_name)
          changes the save directory.
 void setTrackerScrapeResponse(TRTrackerScraperResponse response)
           
 void setUserData(java.lang.Object key, java.lang.Object value)
          To store arbitrary objects against this object.
 void startDownload()
           
 void stopIt(int stateAfterStopping, boolean remove_torrent, boolean remove_data)
          Stop the download manager, and do any file/torrent removals.
 void stopIt(int stateAfterStopping, boolean remove_torrent, boolean remove_data, boolean for_removal)
          As above but definitely indicates that the stop is for removal (if for_removal is true) and therefore that any removal specific actions such as removing partial files should be performed
 void updateAutoUploadPriority(java.lang.Object key, boolean inc)
           
 
Methods inherited from interface com.aelitis.azureus.core.tag.Taggable
getTaggableID, getTaggableResolver, getTaggableTransientProperty, getTaggableType, setTaggableTransientProperty
 

Field Detail

STATE_START_OF_DAY

static final int STATE_START_OF_DAY
See Also:
Constant Field Values

STATE_WAITING

static final int STATE_WAITING
See Also:
Constant Field Values

STATE_INITIALIZING

static final int STATE_INITIALIZING
See Also:
Constant Field Values

STATE_INITIALIZED

static final int STATE_INITIALIZED
See Also:
Constant Field Values

STATE_ALLOCATING

static final int STATE_ALLOCATING
See Also:
Constant Field Values

STATE_CHECKING

static final int STATE_CHECKING
See Also:
Constant Field Values

STATE_READY

static final int STATE_READY
See Also:
Constant Field Values

STATE_DOWNLOADING

static final int STATE_DOWNLOADING
See Also:
Constant Field Values

STATE_FINISHING

static final int STATE_FINISHING
See Also:
Constant Field Values

STATE_SEEDING

static final int STATE_SEEDING
See Also:
Constant Field Values

STATE_STOPPING

static final int STATE_STOPPING
See Also:
Constant Field Values

STATE_STOPPED

static final int STATE_STOPPED
See Also:
Constant Field Values

STATE_CLOSED

static final int STATE_CLOSED
See Also:
Constant Field Values

STATE_QUEUED

static final int STATE_QUEUED
See Also:
Constant Field Values

STATE_ERROR

static final int STATE_ERROR
See Also:
Constant Field Values

WEALTH_STOPPED

static final int WEALTH_STOPPED
See Also:
Constant Field Values

WEALTH_NO_TRACKER

static final int WEALTH_NO_TRACKER
See Also:
Constant Field Values

WEALTH_NO_REMOTE

static final int WEALTH_NO_REMOTE
See Also:
Constant Field Values

WEALTH_OK

static final int WEALTH_OK
See Also:
Constant Field Values

WEALTH_KO

static final int WEALTH_KO
See Also:
Constant Field Values

WEALTH_ERROR

static final int WEALTH_ERROR
See Also:
Constant Field Values

ET_NONE

static final int ET_NONE
See Also:
Constant Field Values

ET_OTHER

static final int ET_OTHER
See Also:
Constant Field Values

ET_INSUFFICIENT_SPACE

static final int ET_INSUFFICIENT_SPACE
See Also:
Constant Field Values
Method Detail

initialize

void initialize()

getState

int getState()

getSubState

int getSubState()
For stopping this returns the target state after stopping (stopped/queued)

Returns:

setStateWaiting

void setStateWaiting()

setStateQueued

void setStateQueued()

startDownload

void startDownload()

canForceRecheck

boolean canForceRecheck()

forceRecheck

void forceRecheck()

forceRecheck

void forceRecheck(ForceRecheckListener l)
Parameters:
l -
Since:
3.0.0.7

resetFile

void resetFile(DiskManagerFileInfo file)
Reset the file download state to totally undownloaded. Download must be stopped

Parameters:
file -

recheckFile

void recheckFile(DiskManagerFileInfo file)
Recheck a particular file. Download must be stopped

Parameters:
file -

setPieceCheckingEnabled

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

Parameters:
enabled -

stopIt

void stopIt(int stateAfterStopping,
            boolean remove_torrent,
            boolean remove_data)
Stop the download manager, and do any file/torrent removals.

Parameters:
_stateAfterStopping -
remove_torrent - remove the .torrent file after stopping
remove_data - remove the data file after stopping

stopIt

void stopIt(int stateAfterStopping,
            boolean remove_torrent,
            boolean remove_data,
            boolean for_removal)
As above but definitely indicates that the stop is for removal (if for_removal is true) and therefore that any removal specific actions such as removing partial files should be performed

Parameters:
stateAfterStopping -
remove_torrent -
remove_data -
for_removal -

pause

boolean pause()

pause

boolean pause(long auto_resume_time)

isPaused

boolean isPaused()

resume

void resume()

getAutoResumeTime

long getAutoResumeTime()

getGlobalManager

GlobalManager getGlobalManager()

getDiskManager

DiskManager getDiskManager()

getDiskManagerFileInfo

DiskManagerFileInfo[] getDiskManagerFileInfo()
Deprecated. use getDiskManagerFileInfoSet() instead


getDiskManagerFileInfoSet

DiskManagerFileInfoSet getDiskManagerFileInfoSet()

getNumFileInfos

int getNumFileInfos()

getPeerManager

PEPeerManager getPeerManager()

getDownloadState

DownloadManagerState getDownloadState()

getTorrent

TOTorrent getTorrent()

getTrackerClient

TRTrackerAnnouncer getTrackerClient()

requestTrackerAnnounce

void requestTrackerAnnounce(boolean immediate)

requestTrackerScrape

void requestTrackerScrape(boolean immediate)

getTrackerScrapeResponse

TRTrackerScraperResponse getTrackerScrapeResponse()

getGoodTrackerScrapeResponses

java.util.List<TRTrackerScraperResponse> getGoodTrackerScrapeResponses()

setTrackerScrapeResponse

void setTrackerScrapeResponse(TRTrackerScraperResponse response)

getDisplayName

java.lang.String getDisplayName()

getInternalName

java.lang.String getInternalName()
returns a name based on the torrent hash or an empty string if torrent invalid

Returns:

getSize

long getSize()

getTorrentFileName

java.lang.String getTorrentFileName()
This includes the full path to the torrent file.

Returns:

setTorrentFileName

void setTorrentFileName(java.lang.String string)

getAbsoluteSaveLocation

java.io.File getAbsoluteSaveLocation()
Returns the file location where we save the torrent, this includes the parent directory and the actual file name.


getSaveLocation

java.io.File getSaveLocation()

setTorrentSaveDir

void setTorrentSaveDir(java.lang.String sPath)
changes the save directory. Only call this if you know what you are doing!!!!

Parameters:
sPath -

setTorrentSaveDir

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!!!!

Parameters:
sPath -

isForceStart

boolean isForceStart()

setForceStart

void setForceStart(boolean forceStart)

isPersistent

boolean isPersistent()

isDownloadComplete

boolean isDownloadComplete(boolean bIncludingDND)
Retrieves whether the download is complete

Parameters:
bIncludingDND - true- include files marked as Do Not Download.
false- don't include files marked DND.

If there are DND files and you choose to include DND in the calculation, false will always be returned.

Returns:
whether download is complete

getTrackerStatus

java.lang.String getTrackerStatus()

getTrackerTime

int getTrackerTime()
When the next call to the tracker will occur (in seconds)


getTorrentComment

java.lang.String getTorrentComment()

getTorrentCreatedBy

java.lang.String getTorrentCreatedBy()

getTorrentCreationDate

long getTorrentCreationDate()

getNbPieces

int getNbPieces()

getPieceLength

java.lang.String getPieceLength()

getNbSeeds

int getNbSeeds()

getNbPeers

int getNbPeers()

filesExist

boolean filesExist()
Deprecated. Use filesExist(boolean) - to be removed when EMP dependency removed

Same as filesExist( true );

Returns:

filesExist

boolean filesExist(boolean expected_to_be_allocated)
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.

Parameters:
expected_to_be_allocated - if this is false and allocation hasn't been attempted then the method will return with false without marking the download as in an error state
Returns:
Whether all the non-skipped (non-DND) files exist

getErrorDetails

java.lang.String getErrorDetails()

getErrorType

int getErrorType()

getStats

DownloadManagerStats getStats()

getPosition

int getPosition()

setPosition

void setPosition(int newPosition)

getAssumedComplete

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.

See Also:
#requestAssumedCompleteMode()}

requestAssumedCompleteMode

boolean requestAssumedCompleteMode()
Will set this download to be "assumed complete" for if the download is already complete (excluding DND)

Returns:
true- success; false- failure, download not complete

getHealthStatus

int getHealthStatus()
Returns:
the wealthy status of this download

getNATStatus

int getNATStatus()
See plugin ConnectionManager.NAT_ constants for return values

Returns:

saveResumeData

void saveResumeData()
persist resume data


saveDownload

void saveDownload()
persist any general download related information, excluding resume data which is managed separately by saveResumeData


getData

java.lang.Object getData(java.lang.String key)
Deprecated. Use getUserData

To retreive arbitrary objects against this object.


setData

void setData(java.lang.String key,
             java.lang.Object value)
Deprecated. @deprecated Use setUserData

To store arbitrary objects against this object.


getUserData

java.lang.Object getUserData(java.lang.Object key)

setUserData

void setUserData(java.lang.Object key,
                 java.lang.Object value)
To store arbitrary objects against this object.


isDataAlreadyAllocated

boolean isDataAlreadyAllocated()
Determine whether disk allocation has already been done. Used for checking if data is missing on a previously-loaded torrent.

Returns:
true if data files have already been allocated

setDataAlreadyAllocated

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.

Parameters:
already_allocated -

setSeedingRank

void setSeedingRank(int rank)

getSeedingRank

int getSeedingRank()

isSwarmMerging

java.lang.String isSwarmMerging()

setMaxUploads

void setMaxUploads(int max_slots)

getMaxUploads

int getMaxUploads()

updateAutoUploadPriority

void updateAutoUploadPriority(java.lang.Object key,
                              boolean inc)

getEffectiveMaxUploads

int getEffectiveMaxUploads()
Returns the max uploads depending on whether the download is seeding and it has a separate rate for this

Returns:

getEffectiveUploadRateLimitBytesPerSecond

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

Returns:

setCryptoLevel

void setCryptoLevel(int level)

getCryptoLevel

int getCryptoLevel()

moveDataFiles

void moveDataFiles(java.io.File new_parent_dir)
                   throws DownloadManagerException
Move data files to new location. Torrent must be in stopped/error state

Parameters:
new_parent_dir -
Throws:
DownloadManagerException

moveDataFilesLive

void moveDataFilesLive(java.io.File new_parent_dir)
                       throws DownloadManagerException
At some point someone made the file-move operations stop+restart the download when it was designed to work without doing this (see move-on-complete for example). As I don't know the reason for this change I've (parg) added a new method to do this in the hope that we might in time migrate back to the 'proper' behaviour. grrr

Parameters:
new_parent_dir -
Throws:
DownloadManagerException

copyDataFiles

void copyDataFiles(java.io.File parent_dir)
                   throws DownloadManagerException
Throws:
DownloadManagerException

renameDownload

void renameDownload(java.lang.String new_name)
                    throws DownloadManagerException
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.

Parameters:
new_name -
Throws:
DownloadManagerException

moveDataFiles

void moveDataFiles(java.io.File new_parent_dir,
                   java.lang.String new_name)
                   throws DownloadManagerException
Move the files and rename a download in one go. For convenience - either argument can be null, but not both.

Throws:
DownloadManagerException
See Also:
moveDataFiles(File), renameDownload(String)

moveTorrentFile

void moveTorrentFile(java.io.File new_parent_dir)
                     throws DownloadManagerException
Move torrent file to new location. Download must be stopped/error

Parameters:
new_parent_dir -
Throws:
DownloadManagerException

isInDefaultSaveDir

boolean isInDefaultSaveDir()
Returns true if the download is being saved to one of the default save directories.

Since:
2.5.0.2

getCreationTime

long getCreationTime()
gives the time this download was created (not the torrent but the download itself)

Returns:

setCreationTime

void setCreationTime(long t)

setAnnounceResult

void setAnnounceResult(DownloadAnnounceResult result)

setScrapeResult

void setScrapeResult(DownloadScrapeResult result)

isUnauthorisedOnTracker

boolean isUnauthorisedOnTracker()

isTrackerError

boolean isTrackerError()

getExtendedMessagingMode

int getExtendedMessagingMode()
Returns:
messaging mode = az, lt or bt

destroy

void destroy(boolean is_duplicate)
Indicates that the download manager is no longer needed

Parameters:
is_duplicate - indicates whether this dm is being destroyed because it is a duplicate

isDestroyed

boolean isDestroyed()

getCurrentPieces

PEPiece[] getCurrentPieces()

getCurrentPeers

PEPeer[] getCurrentPeers()

getTrackerPeerSources

java.util.List<TrackerPeerSource> getTrackerPeerSources()

seedPieceRecheck

boolean seedPieceRecheck()
Gives the download an opportunity to schedule seeding mode piece rechecks if desired

Returns:
true if a piece has been rechecked

addRateLimiter

void addRateLimiter(LimitedRateGroup group,
                    boolean upload)

getRateLimiters

LimitedRateGroup[] getRateLimiters(boolean upload)

removeRateLimiter

void removeRateLimiter(LimitedRateGroup group,
                       boolean upload)

addListener

void addListener(DownloadManagerListener listener,
                 boolean triggerStateChange)
Parameters:
listener -
triggerStateChange -
Since:
3.1.1.1

addListener

void addListener(DownloadManagerListener listener)

removeListener

void removeListener(DownloadManagerListener listener)

addTrackerListener

void addTrackerListener(DownloadManagerTrackerListener listener)

removeTrackerListener

void removeTrackerListener(DownloadManagerTrackerListener listener)

addPeerListener

void addPeerListener(DownloadManagerPeerListener listener)

addPeerListener

void addPeerListener(DownloadManagerPeerListener listener,
                     boolean bDispatchForExisting)

removePeerListener

void removePeerListener(DownloadManagerPeerListener listener)

addPieceListener

void addPieceListener(DownloadManagerPieceListener listener)

addPieceListener

void addPieceListener(DownloadManagerPieceListener listener,
                      boolean bDispatchForExisting)

removePieceListener

void removePieceListener(DownloadManagerPieceListener listener)

addDiskListener

void addDiskListener(DownloadManagerDiskListener listener)

removeDiskListener

void removeDiskListener(DownloadManagerDiskListener listener)

getActivationCount

int getActivationCount()

addActivationListener

void addActivationListener(DownloadManagerActivationListener listener)

removeActivationListener

void removeActivationListener(DownloadManagerActivationListener listener)

addTPSListener

void addTPSListener(DownloadManagerTPSListener listener)

removeTPSListener

void removeTPSListener(DownloadManagerTPSListener listener)

generateEvidence

void generateEvidence(IndentWriter writer)

getStorageType

int[] getStorageType(DiskManagerFileInfo[] infos)

canMoveDataFiles

boolean canMoveDataFiles()
Since:
3.0.5.1

rename

void rename(java.lang.String new_name)
            throws DownloadManagerException
Renames the save file, torrent file and the displayed name.

Throws:
DownloadManagerException

renameTorrent

void renameTorrent(java.lang.String new_name)
                   throws DownloadManagerException
Throws:
DownloadManagerException
Since:
3.0.5.1

renameTorrentSafe

void renameTorrentSafe(java.lang.String name)
                       throws DownloadManagerException
Same as renameTorrent, but appends numbers if torrent already exists

Throws:
DownloadManagerException
Since:
4.2.0.9

moveTorrentFile

void moveTorrentFile(java.io.File parent_dir,
                     java.lang.String new_name)
                     throws DownloadManagerException
Throws:
DownloadManagerException
Since:
3.0.5.1

setTorrentFile

void setTorrentFile(java.io.File new_parent_dir,
                    java.lang.String new_name)
                    throws DownloadManagerException
Sets the torrent file name (will perform a move of the torrent file) - this shouldn't be used unless you know what you are doing (it requires the download to be stopped!) - it is safer to use moveTorrentFile instead.

Throws:
DownloadManagerException
Since:
3.0.5.3

fireGlobalManagerEvent

void fireGlobalManagerEvent(int event_type)

setFilePriorities

void setFilePriorities(DiskManagerFileInfo[] fileInfos,
                       int type)
Sets the priority for an array for files

Parameters:
fileInfos -
type -
Since:
5.6.2.1

requestAttention

void requestAttention()