|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gudy.azureus2.core3.logging.LogRelation
org.gudy.azureus2.core3.download.impl.DownloadManagerImpl
public class DownloadManagerImpl
Nested Class Summary | |
---|---|
protected static class |
DownloadManagerImpl.NoStackException
|
Field Summary | |
---|---|
static java.lang.String |
dnd_subfolder
|
protected AEMonitor |
this_mon
|
Fields inherited from interface org.gudy.azureus2.core3.download.DownloadManager |
---|
ET_INSUFFICIENT_SPACE, ET_NONE, ET_OTHER, STATE_ALLOCATING, STATE_CHECKING, STATE_CLOSED, STATE_DOWNLOADING, STATE_ERROR, STATE_FINISHING, STATE_INITIALIZED, STATE_INITIALIZING, STATE_QUEUED, STATE_READY, STATE_SEEDING, STATE_START_OF_DAY, STATE_STOPPED, STATE_STOPPING, STATE_WAITING, WEALTH_ERROR, WEALTH_KO, WEALTH_NO_REMOTE, WEALTH_NO_TRACKER, WEALTH_OK, WEALTH_STOPPED |
Fields inherited from interface com.aelitis.azureus.core.tag.Taggable |
---|
TT_DOWNLOAD, TT_PEER |
Constructor Summary | |
---|---|
DownloadManagerImpl(GlobalManager _gm,
byte[] _torrent_hash,
java.lang.String _torrentFileName,
java.lang.String _torrent_save_dir,
java.lang.String _torrent_save_file,
int _initialState,
boolean _persistent,
boolean _recovered,
boolean _open_for_seeding,
boolean _has_ever_been_started,
java.util.List _file_priorities,
DownloadManagerInitialisationAdapter _initialisation_adapter)
|
Method Summary | |
---|---|
protected boolean |
activateRequest(int count)
|
void |
addActivationListener(DownloadManagerActivationListener listener)
|
void |
addDiskListener(DownloadManagerDiskListener listener)
|
static void |
addGlobalDownloadListener(DownloadManagerListener listener)
|
void |
addListener(DownloadManagerListener listener)
|
void |
addListener(DownloadManagerListener listener,
boolean triggerStateChange)
|
void |
addPeer(PEPeer peer)
|
void |
addPeerListener(DownloadManagerPeerListener listener)
|
void |
addPeerListener(DownloadManagerPeerListener listener,
boolean bDispatchForExisting)
|
void |
addPiece(PEPiece piece)
|
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()
|
protected void |
clearFileLinks()
|
void |
copyDataFiles(java.io.File parent_dir)
|
protected void |
deleteDataFiles()
|
protected void |
deletePartialDataFiles()
|
protected void |
deleteTorrentFile()
|
void |
destroy(boolean is_duplicate)
Indicates that the download manager is no longer needed |
protected void |
downloadEnded(boolean never_downloaded)
Is called when a download is finished. |
boolean |
equals(java.lang.Object obj)
|
boolean |
filesExist()
Deprecated. |
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 eventType)
|
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()
|
protected java.lang.Object[] |
getActiveScrapeResponse()
Returns the "first" online scrape response found, and its active URL, otherwise one of the failing scrapes |
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)
To retreive arbitrary objects against this object. |
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 |
protected int |
getEffectiveUploadPriority()
|
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 |
protected int[] |
getMaxConnections(boolean mixed)
|
protected int[] |
getMaxConnectionsWhenSeeding(boolean mixed)
|
protected int[] |
getMaxSeedConnections(boolean mixed)
|
int |
getMaxUploads()
|
protected int |
getMaxUploadsWhenSeeding()
|
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()
|
java.lang.Object[] |
getQueryableInterfaces()
Query this class for a reference to another class that it may hold |
LimitedRateGroup[] |
getRateLimiters(boolean upload)
|
java.lang.String |
getRelationText()
A short description of what your class holds that can be printed by the logger |
java.io.File |
getSaveLocation()
|
int |
getSeedingRank()
|
long |
getSize()
|
int |
getState()
|
DownloadManagerStats |
getStats()
|
int[] |
getStorageType(DiskManagerFileInfo[] info)
|
int |
getSubState()
For stopping this returns the target state after stopping (stopped/queued) |
java.lang.String |
getTaggableID()
|
TaggableResolver |
getTaggableResolver()
|
java.lang.Object |
getTaggableTransientProperty(java.lang.String key)
|
int |
getTaggableType()
|
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)
To retreive arbitrary objects against a download. |
int |
hashCode()
|
protected void |
informDownloadEnded()
|
protected void |
informPositionChanged(int new_position)
|
protected void |
informPriorityChange(DiskManagerFileInfo file)
|
protected void |
informStarted(PEPeerManager pm)
|
protected void |
informStateChanged()
Doesn't not inform if state didn't change from last inform call |
protected void |
informStopped(PEPeerManager pm,
boolean for_queue)
|
protected void |
informWillBeStarted(PEPeerManager pm)
|
void |
initialize()
|
boolean |
isDataAlreadyAllocated()
Determine whether disk allocation has already been done. |
boolean |
isDestroyed()
|
boolean |
isDownloadComplete(boolean bIncludeDND)
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. |
protected boolean |
isMaxConnectionsWhenSeedingEnabled()
|
protected boolean |
isMaxUploadsWhenSeedingEnabled()
|
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 destination,
java.lang.String new_name)
Move the files and rename a download in one go. |
void |
moveDataFiles(java.io.File destination,
java.lang.String new_name,
boolean live)
|
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 new_parent_dir,
java.lang.String new_name)
|
boolean |
pause()
|
boolean |
pause(long _resume_time)
|
protected void |
readParameters()
|
protected void |
readTorrent()
|
void |
recheckFile(DiskManagerFileInfo file)
Recheck a particular file. |
void |
removeActivationListener(DownloadManagerActivationListener listener)
|
void |
removeDiskListener(DownloadManagerDiskListener listener)
|
static void |
removeGlobalDownloadListener(DownloadManagerListener listener)
|
void |
removeListener(DownloadManagerListener listener)
|
void |
removePeer(PEPeer peer)
|
void |
removePeerListener(DownloadManagerPeerListener listener)
|
void |
removePiece(PEPiece piece)
|
void |
removePieceListener(DownloadManagerPieceListener listener)
|
void |
removeRateLimiter(LimitedRateGroup group,
boolean upload)
|
void |
removeTPSListener(DownloadManagerTPSListener listener)
|
void |
removeTrackerListener(DownloadManagerTrackerListener listener)
|
void |
rename(java.lang.String 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 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 force)
|
void |
requestTrackerScrape(boolean force)
|
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)
|
protected void |
setAssumedComplete(boolean _assumedComplete)
|
void |
setCreationTime(long t)
|
void |
setCryptoLevel(int level)
|
void |
setData(java.lang.String key,
java.lang.Object value)
To store arbitrary objects against this object. |
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. |
protected void |
setFailed()
|
protected void |
setFailed(java.lang.String str)
|
protected void |
setFailed(java.lang.Throwable e)
|
protected void |
setFileLinks()
|
void |
setFilePriorities(DiskManagerFileInfo[] fileInfos,
int priority)
Sets the priority for an array for files |
void |
setForceStart(boolean forceStart)
|
void |
setManualUploadPriority(int priority)
|
void |
setMaxUploads(int max)
|
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 new_position)
|
void |
setScrapeResult(DownloadScrapeResult result)
|
void |
setSeedingRank(int rank)
|
void |
setStateFinishing()
|
void |
setStateQueued()
|
void |
setStateWaiting()
|
void |
setTaggableTransientProperty(java.lang.String key,
java.lang.Object value)
|
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)
|
protected void |
setTorrentInvalid(java.lang.String str)
|
void |
setTorrentSaveDir(java.lang.String new_dir)
changes the save directory. |
void |
setTorrentSaveDir(java.lang.String new_dir,
java.lang.String dl_name)
changes the save directory. |
protected void |
setTrackerRefreshDelayOverrides(int percent)
|
void |
setTrackerScrapeResponse(TRTrackerScraperResponse response)
|
void |
setUserData(java.lang.Object key,
java.lang.Object value)
To store arbitrary objects against a download. |
void |
startDownload()
|
void |
stopIt(int state_after_stopping,
boolean remove_torrent,
boolean remove_data)
Stop the download manager, and do any file/torrent removals. |
void |
stopIt(int state_after_stopping,
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 |
java.lang.String |
toString()
|
void |
updateAutoUploadPriority(java.lang.Object key,
boolean inc)
|
Methods inherited from class org.gudy.azureus2.core3.logging.LogRelation |
---|
propogatedRelationText, queryForClass, queryForClass |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static volatile java.lang.String dnd_subfolder
protected final AEMonitor this_mon
Constructor Detail |
---|
public DownloadManagerImpl(GlobalManager _gm, byte[] _torrent_hash, java.lang.String _torrentFileName, java.lang.String _torrent_save_dir, java.lang.String _torrent_save_file, int _initialState, boolean _persistent, boolean _recovered, boolean _open_for_seeding, boolean _has_ever_been_started, java.util.List _file_priorities, DownloadManagerInitialisationAdapter _initialisation_adapter)
Method Detail |
---|
public static void addGlobalDownloadListener(DownloadManagerListener listener)
public static void removeGlobalDownloadListener(DownloadManagerListener listener)
public int getTaggableType()
public TaggableResolver getTaggableResolver()
public java.lang.String getTaggableID()
protected void readTorrent()
protected void readParameters()
protected int[] getMaxConnections(boolean mixed)
protected int[] getMaxConnectionsWhenSeeding(boolean mixed)
protected boolean isMaxConnectionsWhenSeedingEnabled()
protected int[] getMaxSeedConnections(boolean mixed)
protected boolean isMaxUploadsWhenSeedingEnabled()
protected int getMaxUploadsWhenSeeding()
public void updateAutoUploadPriority(java.lang.Object key, boolean inc)
updateAutoUploadPriority
in interface DownloadManager
protected int getEffectiveUploadPriority()
public int getMaxUploads()
getMaxUploads
in interface DownloadManager
public void setMaxUploads(int max)
setMaxUploads
in interface DownloadManager
public void setManualUploadPriority(int priority)
public int getEffectiveMaxUploads()
DownloadManager
getEffectiveMaxUploads
in interface DownloadManager
public int getEffectiveUploadRateLimitBytesPerSecond()
DownloadManager
getEffectiveUploadRateLimitBytesPerSecond
in interface DownloadManager
protected void setFileLinks()
protected void clearFileLinks()
public boolean filesExist()
DownloadManager
filesExist
in interface DownloadManager
public boolean filesExist(boolean expected_to_be_allocated)
DownloadManager
If a file does not exist, the download will be set to error state.
filesExist
in interface DownloadManager
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
public boolean isPersistent()
isPersistent
in interface DownloadManager
public java.lang.String getDisplayName()
getDisplayName
in interface DownloadManager
public java.lang.String getInternalName()
DownloadManager
getInternalName
in interface DownloadManager
public java.lang.String getErrorDetails()
getErrorDetails
in interface DownloadManager
public int getErrorType()
getErrorType
in interface DownloadManager
public long getSize()
getSize
in interface DownloadManager
protected void setFailed()
protected void setFailed(java.lang.Throwable e)
protected void setFailed(java.lang.String str)
protected void setTorrentInvalid(java.lang.String str)
public void saveResumeData()
DownloadManager
saveResumeData
in interface DownloadManager
public void saveDownload()
DownloadManager
saveDownload
in interface DownloadManager
public void initialize()
initialize
in interface DownloadManager
public void setStateWaiting()
setStateWaiting
in interface DownloadManager
public void setStateFinishing()
public void setStateQueued()
setStateQueued
in interface DownloadManager
public int getState()
getState
in interface DownloadManager
public int getSubState()
DownloadManager
getSubState
in interface DownloadManager
public boolean canForceRecheck()
canForceRecheck
in interface DownloadManager
public void forceRecheck()
forceRecheck
in interface DownloadManager
public void forceRecheck(ForceRecheckListener l)
forceRecheck
in interface DownloadManager
public void setPieceCheckingEnabled(boolean enabled)
DownloadManager
setPieceCheckingEnabled
in interface DownloadManager
public void resetFile(DiskManagerFileInfo file)
DownloadManager
resetFile
in interface DownloadManager
public void recheckFile(DiskManagerFileInfo file)
DownloadManager
recheckFile
in interface DownloadManager
public void startDownload()
startDownload
in interface DownloadManager
public void stopIt(int state_after_stopping, boolean remove_torrent, boolean remove_data)
DownloadManager
stopIt
in interface DownloadManager
remove_torrent
- remove the .torrent file after stoppingremove_data
- remove the data file after stoppingpublic void stopIt(int state_after_stopping, boolean remove_torrent, boolean remove_data, boolean for_removal)
DownloadManager
stopIt
in interface DownloadManager
public boolean pause()
pause
in interface DownloadManager
public boolean pause(long _resume_time)
pause
in interface DownloadManager
public long getAutoResumeTime()
getAutoResumeTime
in interface DownloadManager
public boolean isPaused()
isPaused
in interface DownloadManager
public void resume()
resume
in interface DownloadManager
public boolean getAssumedComplete()
DownloadManager
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.
getAssumedComplete
in interface DownloadManager
#requestAssumedCompleteMode()}
public boolean requestAssumedCompleteMode()
DownloadManager
requestAssumedCompleteMode
in interface DownloadManager
protected void setAssumedComplete(boolean _assumedComplete)
public int getNbSeeds()
getNbSeeds
in interface DownloadManager
public int getNbPeers()
getNbPeers
in interface DownloadManager
public java.lang.String getTrackerStatus()
getTrackerStatus
in interface DownloadManager
public TRTrackerAnnouncer getTrackerClient()
getTrackerClient
in interface DownloadManager
public void setAnnounceResult(DownloadAnnounceResult result)
setAnnounceResult
in interface DownloadManager
public void setScrapeResult(DownloadScrapeResult result)
setScrapeResult
in interface DownloadManager
public int getNbPieces()
getNbPieces
in interface DownloadManager
public int getTrackerTime()
DownloadManager
getTrackerTime
in interface DownloadManager
public TOTorrent getTorrent()
getTorrent
in interface DownloadManager
public java.io.File getSaveLocation()
getSaveLocation
in interface DownloadManager
public java.io.File getAbsoluteSaveLocation()
DownloadManager
getAbsoluteSaveLocation
in interface DownloadManager
public void setTorrentSaveDir(java.lang.String new_dir)
DownloadManager
setTorrentSaveDir
in interface DownloadManager
public void setTorrentSaveDir(java.lang.String new_dir, java.lang.String dl_name)
DownloadManager
setTorrentSaveDir
in interface DownloadManager
public java.lang.String getPieceLength()
getPieceLength
in interface DownloadManager
public java.lang.String getTorrentFileName()
DownloadManager
getTorrentFileName
in interface DownloadManager
public void setTorrentFileName(java.lang.String string)
setTorrentFileName
in interface DownloadManager
public void setTrackerScrapeResponse(TRTrackerScraperResponse response)
setTrackerScrapeResponse
in interface DownloadManager
public TRTrackerScraperResponse getTrackerScrapeResponse()
getTrackerScrapeResponse
in interface DownloadManager
protected java.lang.Object[] getActiveScrapeResponse()
public java.util.List<TRTrackerScraperResponse> getGoodTrackerScrapeResponses()
getGoodTrackerScrapeResponses
in interface DownloadManager
public void requestTrackerAnnounce(boolean force)
requestTrackerAnnounce
in interface DownloadManager
public void requestTrackerScrape(boolean force)
requestTrackerScrape
in interface DownloadManager
protected void setTrackerRefreshDelayOverrides(int percent)
protected boolean activateRequest(int count)
public int getActivationCount()
getActivationCount
in interface DownloadManager
public java.lang.String getTorrentComment()
getTorrentComment
in interface DownloadManager
public java.lang.String getTorrentCreatedBy()
getTorrentCreatedBy
in interface DownloadManager
public long getTorrentCreationDate()
getTorrentCreationDate
in interface DownloadManager
public GlobalManager getGlobalManager()
getGlobalManager
in interface DownloadManager
public DiskManager getDiskManager()
getDiskManager
in interface DownloadManager
public DiskManagerFileInfoSet getDiskManagerFileInfoSet()
getDiskManagerFileInfoSet
in interface DownloadManager
public DiskManagerFileInfo[] getDiskManagerFileInfo()
getDiskManagerFileInfo
in interface DownloadManager
public int getNumFileInfos()
getNumFileInfos
in interface DownloadManager
public PEPeerManager getPeerManager()
getPeerManager
in interface DownloadManager
public boolean isDownloadComplete(boolean bIncludeDND)
DownloadManager
isDownloadComplete
in interface DownloadManager
bIncludeDND
- true- include files marked as Do Not Download.If there are DND files and you choose to include DND in the calculation, false will always be returned.
public void addListener(DownloadManagerListener listener)
addListener
in interface DownloadManager
public void addListener(DownloadManagerListener listener, boolean triggerStateChange)
addListener
in interface DownloadManager
public void removeListener(DownloadManagerListener listener)
removeListener
in interface DownloadManager
protected void informStateChanged()
protected void informDownloadEnded()
protected void informPriorityChange(DiskManagerFileInfo file)
protected void informPositionChanged(int new_position)
public void addPeerListener(DownloadManagerPeerListener listener)
addPeerListener
in interface DownloadManager
public void addPeerListener(DownloadManagerPeerListener listener, boolean bDispatchForExisting)
addPeerListener
in interface DownloadManager
public void removePeerListener(DownloadManagerPeerListener listener)
removePeerListener
in interface DownloadManager
public void addPieceListener(DownloadManagerPieceListener listener)
addPieceListener
in interface DownloadManager
public void addPieceListener(DownloadManagerPieceListener listener, boolean bDispatchForExisting)
addPieceListener
in interface DownloadManager
public void removePieceListener(DownloadManagerPieceListener listener)
removePieceListener
in interface DownloadManager
public void addPeer(PEPeer peer)
public void removePeer(PEPeer peer)
public PEPeer[] getCurrentPeers()
getCurrentPeers
in interface DownloadManager
public void addPiece(PEPiece piece)
public void removePiece(PEPiece piece)
public PEPiece[] getCurrentPieces()
getCurrentPieces
in interface DownloadManager
protected void informWillBeStarted(PEPeerManager pm)
protected void informStarted(PEPeerManager pm)
protected void informStopped(PEPeerManager pm, boolean for_queue)
public DownloadManagerStats getStats()
getStats
in interface DownloadManager
public boolean isForceStart()
isForceStart
in interface DownloadManager
public void setForceStart(boolean forceStart)
setForceStart
in interface DownloadManager
protected void downloadEnded(boolean never_downloaded)
never_downloaded
- true indicates that we never actually downloaded
anything in this session, but we determined that
the download is complete (usually via
startDownload())public void addDiskListener(DownloadManagerDiskListener listener)
addDiskListener
in interface DownloadManager
public void removeDiskListener(DownloadManagerDiskListener listener)
removeDiskListener
in interface DownloadManager
public void addActivationListener(DownloadManagerActivationListener listener)
addActivationListener
in interface DownloadManager
public void removeActivationListener(DownloadManagerActivationListener listener)
removeActivationListener
in interface DownloadManager
public int getHealthStatus()
getHealthStatus
in interface DownloadManager
public int getNATStatus()
DownloadManager
getNATStatus
in interface DownloadManager
public int getPosition()
getPosition
in interface DownloadManager
public void setPosition(int new_position)
setPosition
in interface DownloadManager
public void addTrackerListener(DownloadManagerTrackerListener listener)
addTrackerListener
in interface DownloadManager
public void removeTrackerListener(DownloadManagerTrackerListener listener)
removeTrackerListener
in interface DownloadManager
protected void deleteDataFiles()
protected void deletePartialDataFiles()
protected void deleteTorrentFile()
public DownloadManagerState getDownloadState()
getDownloadState
in interface DownloadManager
public java.lang.Object getData(java.lang.String key)
DownloadManager
getData
in interface DownloadManager
public void setData(java.lang.String key, java.lang.Object value)
DownloadManager
setData
in interface DownloadManager
public java.lang.Object getUserData(java.lang.Object key)
getUserData
in interface DownloadManager
public void setUserData(java.lang.Object key, java.lang.Object value)
setUserData
in interface DownloadManager
public java.lang.Object getTaggableTransientProperty(java.lang.String key)
public void setTaggableTransientProperty(java.lang.String key, java.lang.Object value)
public boolean isDataAlreadyAllocated()
DownloadManager
isDataAlreadyAllocated
in interface DownloadManager
public void setDataAlreadyAllocated(boolean already_allocated)
DownloadManager
setDataAlreadyAllocated
in interface DownloadManager
public void setSeedingRank(int rank)
setSeedingRank
in interface DownloadManager
public int getSeedingRank()
getSeedingRank
in interface DownloadManager
public long getCreationTime()
DownloadManager
getCreationTime
in interface DownloadManager
public void setCreationTime(long t)
setCreationTime
in interface DownloadManager
public java.lang.String isSwarmMerging()
isSwarmMerging
in interface DownloadManager
public int getExtendedMessagingMode()
getExtendedMessagingMode
in interface DownloadManager
public void setCryptoLevel(int level)
setCryptoLevel
in interface DownloadManager
public int getCryptoLevel()
getCryptoLevel
in interface DownloadManager
public void moveDataFiles(java.io.File new_parent_dir) throws DownloadManagerException
DownloadManager
moveDataFiles
in interface DownloadManager
DownloadManagerException
public void moveDataFilesLive(java.io.File new_parent_dir) throws DownloadManagerException
DownloadManager
moveDataFilesLive
in interface DownloadManager
DownloadManagerException
public void renameDownload(java.lang.String new_name) throws DownloadManagerException
DownloadManager
renameDownload
in interface DownloadManager
DownloadManagerException
public void moveDataFiles(java.io.File destination, java.lang.String new_name) throws DownloadManagerException
DownloadManager
moveDataFiles
in interface DownloadManager
DownloadManagerException
DownloadManager.moveDataFiles(File)
,
DownloadManager.renameDownload(String)
public void moveDataFiles(java.io.File destination, java.lang.String new_name, boolean live) throws DownloadManagerException
DownloadManagerException
public void copyDataFiles(java.io.File parent_dir) throws DownloadManagerException
copyDataFiles
in interface DownloadManager
DownloadManagerException
public void moveTorrentFile(java.io.File new_parent_dir) throws DownloadManagerException
DownloadManager
moveTorrentFile
in interface DownloadManager
DownloadManagerException
public void moveTorrentFile(java.io.File new_parent_dir, java.lang.String new_name) throws DownloadManagerException
moveTorrentFile
in interface DownloadManager
DownloadManagerException
public void setTorrentFile(java.io.File new_parent_dir, java.lang.String new_name) throws DownloadManagerException
DownloadManager
setTorrentFile
in interface DownloadManager
DownloadManagerException
public boolean isInDefaultSaveDir()
DownloadManager
isInDefaultSaveDir
in interface DownloadManager
public boolean seedPieceRecheck()
DownloadManager
seedPieceRecheck
in interface DownloadManager
public void addRateLimiter(LimitedRateGroup group, boolean upload)
addRateLimiter
in interface DownloadManager
public LimitedRateGroup[] getRateLimiters(boolean upload)
getRateLimiters
in interface DownloadManager
public void removeRateLimiter(LimitedRateGroup group, boolean upload)
removeRateLimiter
in interface DownloadManager
public boolean isTrackerError()
isTrackerError
in interface DownloadManager
public boolean isUnauthorisedOnTracker()
isUnauthorisedOnTracker
in interface DownloadManager
public java.util.List<TrackerPeerSource> getTrackerPeerSources()
getTrackerPeerSources
in interface DownloadManager
public void addTPSListener(DownloadManagerTPSListener listener)
addTPSListener
in interface DownloadManager
public void removeTPSListener(DownloadManagerTPSListener listener)
removeTPSListener
in interface DownloadManager
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getRelationText()
LogRelation
getRelationText
in class LogRelation
public java.lang.Object[] getQueryableInterfaces()
LogRelation
getQueryableInterfaces
in class LogRelation
public java.lang.String toString()
toString
in class java.lang.Object
public void generateEvidence(IndentWriter writer)
generateEvidence
in interface DownloadManager
public void destroy(boolean is_duplicate)
DownloadManager
destroy
in interface DownloadManager
is_duplicate
- indicates whether this dm is being destroyed because it is a duplicatepublic boolean isDestroyed()
isDestroyed
in interface DownloadManager
public int[] getStorageType(DiskManagerFileInfo[] info)
getStorageType
in interface DownloadManager
public boolean canMoveDataFiles()
canMoveDataFiles
in interface DownloadManager
public void rename(java.lang.String name) throws DownloadManagerException
DownloadManager
rename
in interface DownloadManager
DownloadManagerException
public void renameTorrent(java.lang.String name) throws DownloadManagerException
renameTorrent
in interface DownloadManager
DownloadManagerException
public void renameTorrentSafe(java.lang.String name) throws DownloadManagerException
DownloadManager
renameTorrentSafe
in interface DownloadManager
DownloadManagerException
public void requestAttention()
requestAttention
in interface DownloadManager
public void fireGlobalManagerEvent(int eventType)
fireGlobalManagerEvent
in interface DownloadManager
public void setFilePriorities(DiskManagerFileInfo[] fileInfos, int priority)
DownloadManager
setFilePriorities
in interface DownloadManager
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |