|
|||||||||
| 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 DownloadManagerprotected int getEffectiveUploadPriority()
public int getMaxUploads()
getMaxUploads in interface DownloadManagerpublic void setMaxUploads(int max)
setMaxUploads in interface DownloadManagerpublic void setManualUploadPriority(int priority)
public int getEffectiveMaxUploads()
DownloadManager
getEffectiveMaxUploads in interface DownloadManagerpublic int getEffectiveUploadRateLimitBytesPerSecond()
DownloadManager
getEffectiveUploadRateLimitBytesPerSecond in interface DownloadManagerprotected void setFileLinks()
protected void clearFileLinks()
public boolean filesExist()
DownloadManager
filesExist in interface DownloadManagerpublic boolean filesExist(boolean expected_to_be_allocated)
DownloadManagerIf a file does not exist, the download will be set to error state.
filesExist in interface DownloadManagerexpected_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 DownloadManagerpublic java.lang.String getDisplayName()
getDisplayName in interface DownloadManagerpublic java.lang.String getInternalName()
DownloadManager
getInternalName in interface DownloadManagerpublic java.lang.String getErrorDetails()
getErrorDetails in interface DownloadManagerpublic int getErrorType()
getErrorType in interface DownloadManagerpublic long getSize()
getSize in interface DownloadManagerprotected 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 DownloadManagerpublic void saveDownload()
DownloadManager
saveDownload in interface DownloadManagerpublic void initialize()
initialize in interface DownloadManagerpublic void setStateWaiting()
setStateWaiting in interface DownloadManagerpublic void setStateFinishing()
public void setStateQueued()
setStateQueued in interface DownloadManagerpublic int getState()
getState in interface DownloadManagerpublic int getSubState()
DownloadManager
getSubState in interface DownloadManagerpublic boolean canForceRecheck()
canForceRecheck in interface DownloadManagerpublic void forceRecheck()
forceRecheck in interface DownloadManagerpublic void forceRecheck(ForceRecheckListener l)
forceRecheck in interface DownloadManagerpublic void setPieceCheckingEnabled(boolean enabled)
DownloadManager
setPieceCheckingEnabled in interface DownloadManagerpublic void resetFile(DiskManagerFileInfo file)
DownloadManager
resetFile in interface DownloadManagerpublic void recheckFile(DiskManagerFileInfo file)
DownloadManager
recheckFile in interface DownloadManagerpublic void startDownload()
startDownload in interface DownloadManager
public void stopIt(int state_after_stopping,
boolean remove_torrent,
boolean remove_data)
DownloadManager
stopIt in interface DownloadManagerremove_torrent - remove the .torrent file after stoppingremove_data - remove the data file after stopping
public void stopIt(int state_after_stopping,
boolean remove_torrent,
boolean remove_data,
boolean for_removal)
DownloadManager
stopIt in interface DownloadManagerpublic boolean pause()
pause in interface DownloadManagerpublic boolean pause(long _resume_time)
pause in interface DownloadManagerpublic long getAutoResumeTime()
getAutoResumeTime in interface DownloadManagerpublic boolean isPaused()
isPaused in interface DownloadManagerpublic void resume()
resume in interface DownloadManagerpublic boolean getAssumedComplete()
DownloadManagerAssumed 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 DownloadManagerprotected void setAssumedComplete(boolean _assumedComplete)
public int getNbSeeds()
getNbSeeds in interface DownloadManagerpublic int getNbPeers()
getNbPeers in interface DownloadManagerpublic java.lang.String getTrackerStatus()
getTrackerStatus in interface DownloadManagerpublic TRTrackerAnnouncer getTrackerClient()
getTrackerClient in interface DownloadManagerpublic void setAnnounceResult(DownloadAnnounceResult result)
setAnnounceResult in interface DownloadManagerpublic void setScrapeResult(DownloadScrapeResult result)
setScrapeResult in interface DownloadManagerpublic int getNbPieces()
getNbPieces in interface DownloadManagerpublic int getTrackerTime()
DownloadManager
getTrackerTime in interface DownloadManagerpublic TOTorrent getTorrent()
getTorrent in interface DownloadManagerpublic java.io.File getSaveLocation()
getSaveLocation in interface DownloadManagerpublic java.io.File getAbsoluteSaveLocation()
DownloadManager
getAbsoluteSaveLocation in interface DownloadManagerpublic 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 DownloadManagerpublic java.lang.String getPieceLength()
getPieceLength in interface DownloadManagerpublic java.lang.String getTorrentFileName()
DownloadManager
getTorrentFileName in interface DownloadManagerpublic void setTorrentFileName(java.lang.String string)
setTorrentFileName in interface DownloadManagerpublic void setTrackerScrapeResponse(TRTrackerScraperResponse response)
setTrackerScrapeResponse in interface DownloadManagerpublic TRTrackerScraperResponse getTrackerScrapeResponse()
getTrackerScrapeResponse in interface DownloadManagerprotected java.lang.Object[] getActiveScrapeResponse()
public java.util.List<TRTrackerScraperResponse> getGoodTrackerScrapeResponses()
getGoodTrackerScrapeResponses in interface DownloadManagerpublic void requestTrackerAnnounce(boolean force)
requestTrackerAnnounce in interface DownloadManagerpublic void requestTrackerScrape(boolean force)
requestTrackerScrape in interface DownloadManagerprotected void setTrackerRefreshDelayOverrides(int percent)
protected boolean activateRequest(int count)
public int getActivationCount()
getActivationCount in interface DownloadManagerpublic java.lang.String getTorrentComment()
getTorrentComment in interface DownloadManagerpublic java.lang.String getTorrentCreatedBy()
getTorrentCreatedBy in interface DownloadManagerpublic long getTorrentCreationDate()
getTorrentCreationDate in interface DownloadManagerpublic GlobalManager getGlobalManager()
getGlobalManager in interface DownloadManagerpublic DiskManager getDiskManager()
getDiskManager in interface DownloadManagerpublic DiskManagerFileInfoSet getDiskManagerFileInfoSet()
getDiskManagerFileInfoSet in interface DownloadManagerpublic DiskManagerFileInfo[] getDiskManagerFileInfo()
getDiskManagerFileInfo in interface DownloadManagerpublic int getNumFileInfos()
getNumFileInfos in interface DownloadManagerpublic PEPeerManager getPeerManager()
getPeerManager in interface DownloadManagerpublic boolean isDownloadComplete(boolean bIncludeDND)
DownloadManager
isDownloadComplete in interface DownloadManagerbIncludeDND - 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 DownloadManagerpublic void removeListener(DownloadManagerListener listener)
removeListener in interface DownloadManagerprotected 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 DownloadManagerpublic void removePeerListener(DownloadManagerPeerListener listener)
removePeerListener in interface DownloadManagerpublic void addPieceListener(DownloadManagerPieceListener listener)
addPieceListener in interface DownloadManager
public void addPieceListener(DownloadManagerPieceListener listener,
boolean bDispatchForExisting)
addPieceListener in interface DownloadManagerpublic void removePieceListener(DownloadManagerPieceListener listener)
removePieceListener in interface DownloadManagerpublic void addPeer(PEPeer peer)
public void removePeer(PEPeer peer)
public PEPeer[] getCurrentPeers()
getCurrentPeers in interface DownloadManagerpublic void addPiece(PEPiece piece)
public void removePiece(PEPiece piece)
public PEPiece[] getCurrentPieces()
getCurrentPieces in interface DownloadManagerprotected void informWillBeStarted(PEPeerManager pm)
protected void informStarted(PEPeerManager pm)
protected void informStopped(PEPeerManager pm,
boolean for_queue)
public DownloadManagerStats getStats()
getStats in interface DownloadManagerpublic boolean isForceStart()
isForceStart in interface DownloadManagerpublic void setForceStart(boolean forceStart)
setForceStart in interface DownloadManagerprotected 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 DownloadManagerpublic void removeDiskListener(DownloadManagerDiskListener listener)
removeDiskListener in interface DownloadManagerpublic void addActivationListener(DownloadManagerActivationListener listener)
addActivationListener in interface DownloadManagerpublic void removeActivationListener(DownloadManagerActivationListener listener)
removeActivationListener in interface DownloadManagerpublic int getHealthStatus()
getHealthStatus in interface DownloadManagerpublic int getNATStatus()
DownloadManager
getNATStatus in interface DownloadManagerpublic int getPosition()
getPosition in interface DownloadManagerpublic void setPosition(int new_position)
setPosition in interface DownloadManagerpublic void addTrackerListener(DownloadManagerTrackerListener listener)
addTrackerListener in interface DownloadManagerpublic void removeTrackerListener(DownloadManagerTrackerListener listener)
removeTrackerListener in interface DownloadManagerprotected void deleteDataFiles()
protected void deletePartialDataFiles()
protected void deleteTorrentFile()
public DownloadManagerState getDownloadState()
getDownloadState in interface DownloadManagerpublic 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 DownloadManagerpublic 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 DownloadManagerpublic 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 DownloadManagerpublic void setDataAlreadyAllocated(boolean already_allocated)
DownloadManager
setDataAlreadyAllocated in interface DownloadManagerpublic void setSeedingRank(int rank)
setSeedingRank in interface DownloadManagerpublic int getSeedingRank()
getSeedingRank in interface DownloadManagerpublic long getCreationTime()
DownloadManager
getCreationTime in interface DownloadManagerpublic void setCreationTime(long t)
setCreationTime in interface DownloadManagerpublic java.lang.String isSwarmMerging()
isSwarmMerging in interface DownloadManagerpublic int getExtendedMessagingMode()
getExtendedMessagingMode in interface DownloadManagerpublic void setCryptoLevel(int level)
setCryptoLevel in interface DownloadManagerpublic int getCryptoLevel()
getCryptoLevel in interface DownloadManager
public void moveDataFiles(java.io.File new_parent_dir)
throws DownloadManagerException
DownloadManager
moveDataFiles in interface DownloadManagerDownloadManagerException
public void moveDataFilesLive(java.io.File new_parent_dir)
throws DownloadManagerException
DownloadManager
moveDataFilesLive in interface DownloadManagerDownloadManagerException
public void renameDownload(java.lang.String new_name)
throws DownloadManagerException
DownloadManager
renameDownload in interface DownloadManagerDownloadManagerException
public void moveDataFiles(java.io.File destination,
java.lang.String new_name)
throws DownloadManagerException
DownloadManager
moveDataFiles in interface DownloadManagerDownloadManagerExceptionDownloadManager.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 DownloadManagerDownloadManagerException
public void moveTorrentFile(java.io.File new_parent_dir)
throws DownloadManagerException
DownloadManager
moveTorrentFile in interface DownloadManagerDownloadManagerException
public void moveTorrentFile(java.io.File new_parent_dir,
java.lang.String new_name)
throws DownloadManagerException
moveTorrentFile in interface DownloadManagerDownloadManagerException
public void setTorrentFile(java.io.File new_parent_dir,
java.lang.String new_name)
throws DownloadManagerException
DownloadManager
setTorrentFile in interface DownloadManagerDownloadManagerExceptionpublic boolean isInDefaultSaveDir()
DownloadManager
isInDefaultSaveDir in interface DownloadManagerpublic boolean seedPieceRecheck()
DownloadManager
seedPieceRecheck in interface DownloadManager
public void addRateLimiter(LimitedRateGroup group,
boolean upload)
addRateLimiter in interface DownloadManagerpublic LimitedRateGroup[] getRateLimiters(boolean upload)
getRateLimiters in interface DownloadManager
public void removeRateLimiter(LimitedRateGroup group,
boolean upload)
removeRateLimiter in interface DownloadManagerpublic boolean isTrackerError()
isTrackerError in interface DownloadManagerpublic boolean isUnauthorisedOnTracker()
isUnauthorisedOnTracker in interface DownloadManagerpublic java.util.List<TrackerPeerSource> getTrackerPeerSources()
getTrackerPeerSources in interface DownloadManagerpublic void addTPSListener(DownloadManagerTPSListener listener)
addTPSListener in interface DownloadManagerpublic void removeTPSListener(DownloadManagerTPSListener listener)
removeTPSListener in interface DownloadManagerpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getRelationText()
LogRelation
getRelationText in class LogRelationpublic java.lang.Object[] getQueryableInterfaces()
LogRelation
getQueryableInterfaces in class LogRelationpublic java.lang.String toString()
toString in class java.lang.Objectpublic void generateEvidence(IndentWriter writer)
generateEvidence in interface DownloadManagerpublic void destroy(boolean is_duplicate)
DownloadManager
destroy in interface DownloadManageris_duplicate - indicates whether this dm is being destroyed because it is a duplicatepublic boolean isDestroyed()
isDestroyed in interface DownloadManagerpublic int[] getStorageType(DiskManagerFileInfo[] info)
getStorageType in interface DownloadManagerpublic boolean canMoveDataFiles()
canMoveDataFiles in interface DownloadManager
public void rename(java.lang.String name)
throws DownloadManagerException
DownloadManager
rename in interface DownloadManagerDownloadManagerException
public void renameTorrent(java.lang.String name)
throws DownloadManagerException
renameTorrent in interface DownloadManagerDownloadManagerException
public void renameTorrentSafe(java.lang.String name)
throws DownloadManagerException
DownloadManager
renameTorrentSafe in interface DownloadManagerDownloadManagerExceptionpublic void requestAttention()
requestAttention in interface DownloadManagerpublic 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 | ||||||||