|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GlobalManager
The GlobalManager contains a list of all the downloads (DownloadManager objects) that Azureus controls.
Method Summary | |
---|---|
DownloadManager |
addDownloadManager(String fileName,
byte[] optionalHash,
String savePath,
int initialState,
boolean persistent)
Create and add a Download Manager to the global list |
DownloadManager |
addDownloadManager(String fileName,
byte[] optionalHash,
String savePath,
int initialState,
boolean persistent,
boolean for_seeding,
DownloadManagerInitialisationAdapter adapter)
Create and add a Download Manager to the global list |
DownloadManager |
addDownloadManager(String fileName,
byte[] optionalHash,
String savePath,
String saveFile,
int initialState,
boolean persistent,
boolean for_seeding,
DownloadManagerInitialisationAdapter adapter)
Create and add a Download Manager to the global list |
DownloadManager |
addDownloadManager(String file_name,
String save_path)
Create and add a Download Manager to the global list |
void |
addDownloadManagerInitialisationAdapter(DownloadManagerInitialisationAdapter adapter)
Any adapters added will get a chance to see/set the initial state of downloads as they are added |
void |
addDownloadWillBeRemovedListener(GlobalManagerDownloadWillBeRemovedListener l)
Add a listener triggered when Download is about to be removed |
void |
addEventListener(GlobalManagerEventListener listener)
|
void |
addListener(GlobalManagerListener l)
Add a Global Manager listener |
void |
addListener(GlobalManagerListener listener,
boolean trigger)
|
void |
canDownloadManagerBeRemoved(DownloadManager dm,
boolean remove_torrent,
boolean remove_data)
Determines whether a DownloadManager can be removed |
boolean |
canPauseDownloads()
Indicates whether or not there are any downloads that can be paused. |
boolean |
canResumeDownloads()
Indicates whether or not there are any paused downloads to resume. |
void |
clearNonPersistentDownloadState(byte[] hash)
|
boolean |
contains(DownloadManager manager)
|
int |
downloadManagerCount(boolean bCompleted)
Retrieve the number of download managers the global manager is managing. |
Map |
exportDownloadStateToMap(DownloadManager dm)
|
void |
fireGlobalManagerEvent(int type,
DownloadManager param)
|
void |
fixUpDownloadManagerPositions()
Verifies the positions of the DownloadManagers, filling in gaps and shifting duplicate IDs down if necessary. |
Object |
getDownloadHistoryManager()
|
DownloadManager |
getDownloadManager(HashWrapper hash)
Retrieve the DownloadManager associated with a hash |
DownloadManager |
getDownloadManager(TOTorrent torrent)
Retrieve the DownloadManager associated with a TOTorrent object |
List<DownloadManager> |
getDownloadManagers()
Retrieve a list of DownloadManager s that GlobalManager is handling |
int |
getIndexOf(DownloadManager dm)
Deprecated. Should not be used, as indexes may be different than when getDownloadManagers() was called. |
MainlineDHTProvider |
getMainlineDHTProvider()
|
int |
getNATStatus()
See plugin ConnectionManager.NAT_ constants for return values |
int |
getPauseDownloadPeriodRemaining()
seconds remaining, 0 if not active |
GlobalManagerStats |
getStats()
Retrieve the Global Manager Statistics class |
TRTrackerScraper |
getTrackerScraper()
Retrieve the Tracker Scraper management class |
DownloadManager |
importDownloadStateFromMap(Map map)
|
boolean |
isMoveableDown(DownloadManager dm)
Retrieve whether a DownloadManager can move down in the GlobalManager list |
boolean |
isMoveableUp(DownloadManager dm)
Retrieve whether a DownloadManager can move up in the GlobalManager list |
boolean |
isPaused(DownloadManager dm)
Retrieve whether a DownloadManager is in a paused state |
boolean |
isPotentiallySeedingOnly()
As for isSeedingOnly but includes queued seeds |
boolean |
isSeedingOnly()
Determines whether we are only seeding, and not currently downloading anything. |
String |
isSwarmMerging(DownloadManager dm)
|
void |
loadExistingTorrentsNow(boolean async)
|
void |
moveDown(DownloadManager dm)
Move one DownloadManager down in the GlobalManager's list |
void |
moveEnd(DownloadManager[] dm)
Move a list of DownloadManagers to the end of the GlobalManager list |
void |
moveTo(DownloadManager manager,
int newPosition)
Move a Downloadmanager to a new position. |
void |
moveTop(DownloadManager[] dm)
Move a list of DownloadManagers to the top of the GlobalManager list |
void |
moveUp(DownloadManager dm)
Move one DownloadManager up in the GlobalManager's list |
boolean |
pauseDownload(DownloadManager dm)
Pause one DownloadManager |
void |
pauseDownloads()
Pauses (stops) all running downloads/seedings. |
void |
pauseDownloadsForPeriod(int seconds)
pause any non-paused downloads and auto-resume all downloads after n seconds |
void |
removeDownloadManager(DownloadManager dm)
Removes a DownloadManager from the global list, providing it can be removed (see #canDownloadManagerBeRemoved(DownloadManager) ) |
void |
removeDownloadManager(DownloadManager manager,
boolean remove_torrent,
boolean remove_data)
|
void |
removeDownloadManagerInitialisationAdapter(DownloadManagerInitialisationAdapter adapter)
|
void |
removeDownloadWillBeRemovedListener(GlobalManagerDownloadWillBeRemovedListener l)
Remove a listener triggered when Download is about to be removed |
void |
removeEventListener(GlobalManagerEventListener listener)
|
void |
removeListener(GlobalManagerListener l)
Removes a Global Manager listener |
void |
resumeDownload(DownloadManager dm)
Resume a previously paused DownloadManager |
void |
resumeDownloads()
Resumes (starts) all downloads paused by the previous pauseDownloads call. |
boolean |
resumeDownloads(boolean is_auto_resume)
Attempt to automatically resume downloads - request may be denied if manual override in effect |
boolean |
resumingDownload(DownloadManager dm)
This reports that a download is being resumed in order to remove it from the paused set Don't use this to actually resume a download, use resumeDownload ! |
void |
saveState()
|
void |
setMainlineDHTProvider(MainlineDHTProvider provider)
Calling this method doesn't prepare Azureus to be DHT-ready, it is only used to store, or remove, a DHT provider - so that it can be globally accessible. |
void |
startAllDownloads()
Starts all downloads |
void |
statsRequest(Map request,
Map reply)
|
void |
stopAllDownloads()
Stops all downloads without removing them |
void |
stopGlobalManager()
Puts GlobalManager in a stopped state. Used when closing down Azureus. |
Methods inherited from interface com.aelitis.azureus.core.tag.TaggableResolver |
---|
getResolvedTaggables, getResolverTaggableType, resolveTaggable |
Method Detail |
---|
DownloadManager addDownloadManager(String file_name, String save_path)
file_name
- location and name of torrent filesave_path
- path to write the data to
DownloadManager addDownloadManager(String fileName, byte[] optionalHash, String savePath, int initialState, boolean persistent)
fileName
- location and name of torrent filesavePath
- path to write the data toinitialState
- Initial state of download. See DownloadManager.STATE_*persistent
- Whether the download should be treated as persistent download
DownloadManager addDownloadManager(String fileName, byte[] optionalHash, String savePath, String saveFile, int initialState, boolean persistent, boolean for_seeding, DownloadManagerInitialisationAdapter adapter)
fileName
- location and name of torrent filesavePath
- path to write the data tosafeFile
- subdirectory or filename to write the data toinitialState
- Initial state of download. See DownloadManager.STATE_*persistent
- Whether the download should be treated as persistent downloadfor_seeding
- Whether the manager should assume the torrent is
already complete and ready for seeding.
DownloadManager addDownloadManager(String fileName, byte[] optionalHash, String savePath, int initialState, boolean persistent, boolean for_seeding, DownloadManagerInitialisationAdapter adapter)
fileName
- location and name of torrent filesavePath
- path to write the data toinitialState
- Initial state of download. See DownloadManager.STATE_*persistent
- Whether the download should be treated as persistent downloadfor_seeding
- Whether the manager should assume the torrent is
already complete and ready for seeding.
void removeDownloadManager(DownloadManager dm) throws GlobalManagerDownloadRemovalVetoException
#canDownloadManagerBeRemoved(DownloadManager)
)
The DownloadManager will not be stopped if it is running. Scraping, however, will be turned off.
dm
- DownloadManager to remove
GlobalManagerDownloadRemovalVetoException
void canDownloadManagerBeRemoved(DownloadManager dm, boolean remove_torrent, boolean remove_data) throws GlobalManagerDownloadRemovalVetoException
dm
- DownloadManager to check
GlobalManagerDownloadRemovalVetoException
List<DownloadManager> getDownloadManagers()
DownloadManager
s that GlobalManager is handling
DownloadManager
sDownloadManager getDownloadManager(TOTorrent torrent)
torrent
- Torrent to search for
DownloadManager getDownloadManager(HashWrapper hash)
hash
- Hash to search for
TRTrackerScraper getTrackerScraper()
GlobalManagerStats getStats()
void stopGlobalManager()
void stopAllDownloads()
void startAllDownloads()
void pauseDownloads()
void pauseDownloadsForPeriod(int seconds)
seconds
- int getPauseDownloadPeriodRemaining()
boolean canPauseDownloads()
void resumeDownloads()
boolean resumeDownloads(boolean is_auto_resume)
is_auto_resume
-
boolean canResumeDownloads()
boolean resumingDownload(DownloadManager dm)
dm
-
boolean pauseDownload(DownloadManager dm)
dm
- DownloadManager to pause
void resumeDownload(DownloadManager dm)
dm
- DownloadManager to resumevoid clearNonPersistentDownloadState(byte[] hash)
boolean isPaused(DownloadManager dm)
dm
- DownloadManager to query
String isSwarmMerging(DownloadManager dm)
boolean isSeedingOnly()
boolean isPotentiallySeedingOnly()
int getIndexOf(DownloadManager dm)
getDownloadManagers()
.
This is NOT the DownloadManager's position
dm
- DownloadManger to find the index of
int downloadManagerCount(boolean bCompleted)
bCompleted
- True: Return count of completed downloadsboolean isMoveableDown(DownloadManager dm)
dm
- DownloadManager to check
boolean isMoveableUp(DownloadManager dm)
dm
- DownloadManager to check
void moveTop(DownloadManager[] dm)
dm
- array list of DownloadManager objects to movevoid moveUp(DownloadManager dm)
dm
- DownloadManager to move upvoid moveDown(DownloadManager dm)
dm
- DownloadManager to move downvoid moveEnd(DownloadManager[] dm)
dm
- array list of DownloadManager objects to movevoid moveTo(DownloadManager manager, int newPosition)
manager
- DownloadManager to movenewPosition
- position to placevoid fixUpDownloadManagerPositions()
This does not need to be called after MoveXXX, addDownloadManager, or removeDownloadManager functions.
void addListener(GlobalManagerListener l)
l
- Listener to addvoid removeListener(GlobalManagerListener l)
l
- Listener to removevoid addDownloadWillBeRemovedListener(GlobalManagerDownloadWillBeRemovedListener l)
l
- Listener to addvoid removeDownloadWillBeRemovedListener(GlobalManagerDownloadWillBeRemovedListener l)
l
- Listener to removeint getNATStatus()
void addDownloadManagerInitialisationAdapter(DownloadManagerInitialisationAdapter adapter)
adapter
- void removeDownloadManagerInitialisationAdapter(DownloadManagerInitialisationAdapter adapter)
void addEventListener(GlobalManagerEventListener listener)
void removeEventListener(GlobalManagerEventListener listener)
void fireGlobalManagerEvent(int type, DownloadManager param)
void loadExistingTorrentsNow(boolean async)
listener
- void addListener(GlobalManagerListener listener, boolean trigger)
listener
- trigger
- void removeDownloadManager(DownloadManager manager, boolean remove_torrent, boolean remove_data) throws GlobalManagerDownloadRemovalVetoException
manager
- remove_torrent
- remove_data
-
GlobalManagerDownloadRemovalVetoException
void setMainlineDHTProvider(MainlineDHTProvider provider)
MainlineDHTProvider getMainlineDHTProvider()
void statsRequest(Map request, Map reply)
boolean contains(DownloadManager manager)
manager
-
void saveState()
Map exportDownloadStateToMap(DownloadManager dm)
DownloadManager importDownloadStateFromMap(Map map)
Object getDownloadHistoryManager()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |