|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Field Summary | |
---|---|
System.Collections.Hashtable | cachedSources |
System.Collections.ArrayList |
downloadsInProgress
ArrayList of Downloaders |
Naanou.Common.Hash | localUser |
int | SOURCE_CACHE_MAX |
Constructor Summary | |
---|---|
DownloadManager() Prevent instanciations |
Property Summary | |
---|---|
Naanou.Common.Hash | LocalUser |
string | UserId |
Method Summary | |
---|---|
void | Close() |
Naanou.ResourceExchange.Downloader |
Download(string resource, Naanou.ResourceExchange.Source.Manifest[] likelySources, Naanou.ResourceExchange.Downloader.Priority priority) Downloads a resource for which we have a few sources for |
Naanou.ResourceExchange.Downloader |
Download(ClintHeyer.Httpd.URI uri) Downloads a resource for which we have a Naanou Url |
Naanou.ResourceExchange.Downloader |
Download(string resource, Naanou.ResourceExchange.Downloader.Priority priority) Downloads a resource for which we aren't too sure where to get it from |
Naanou.ResourceExchange.Downloader[] |
DownloadsInProgress() Gets all downloads in progress |
Naanou.ResourceExchange.Source |
GetSource(Naanou.Common.Hash id, string baseUrl) Looks up an existing source, or creates a new one. |
void |
LocateSources(string contentHash, Naanou.Common.QueryProgressDelegate progressDelegate) Locates download sources for a resource (async) |
void | NotifyDownloadCompleted(Naanou.ResourceExchange.Downloader d, bool wasAborted, bool wasError) |
void | NotifyDownloadStarted(Naanou.ResourceExchange.Downloader d) |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Event Summary | |
---|---|
Naanou.ResourceExchange.DownloadCompletedEventHandler |
DownloadCompleted
A download has been completed |
Naanou.ResourceExchange.DownloadStartedEventHandler |
DownloadStarted
A download has started |
Field Detail |
---|
private System.Collections.Hashtable cachedSources
private System.Collections.ArrayList downloadsInProgress
ArrayList of Downloaders
private Naanou.Common.Hash localUser
public int SOURCE_CACHE_MAX
Constructor Detail |
---|
private DownloadManager()
Prevent instanciations
Property Detail |
---|
public Naanou.Common.Hash LocalUser
public string UserId
Method Detail |
---|
public void Close()
public Naanou.ResourceExchange.Downloader Download(string resource, Naanou.ResourceExchange.Source.Manifest[] likelySources, Naanou.ResourceExchange.Downloader.Priority priority)
Downloads a resource for which we have a few sources for
Parameters:
likelyBaseUrls
- priority
- public Naanou.ResourceExchange.Downloader Download(ClintHeyer.Httpd.URI uri)
Downloads a resource for which we have a Naanou Url
Parameters:
url
- Nanaou Url for resource naanou://nodeId@localhost:8080/direct/1238dfg34rnsdf3public Naanou.ResourceExchange.Downloader Download(string resource, Naanou.ResourceExchange.Downloader.Priority priority)
Downloads a resource for which we aren't too sure where to get it from
Parameters:
likelyBaseUrls
- priority
- public Naanou.ResourceExchange.Downloader[] DownloadsInProgress()
Gets all downloads in progress
Returns:
public Naanou.ResourceExchange.Source GetSource(Naanou.Common.Hash id, string baseUrl)
Looks up an existing source, or creates a new one.
Caches up to Naanou.ResourceExchange.DownloadManager.SOURCE_CACHE_MAX entries before purging entire cache. Does not matter too much if in-use sources are removed - we just lose the acquired history data such as simultaneous downloads, generation# etc.
Parameters:id
- Id of sourcebaseUrl
- Base url of sourcepublic void LocateSources(string contentHash, Naanou.Common.QueryProgressDelegate progressDelegate)
Locates download sources for a resource (async)
Parameters:
contentHash
- public void NotifyDownloadCompleted(Naanou.ResourceExchange.Downloader d, bool wasAborted, bool wasError)
public void NotifyDownloadStarted(Naanou.ResourceExchange.Downloader d)
Event Detail |
---|
public Naanou.ResourceExchange.DownloadCompletedEventHandler DownloadCompleted
A download has been completed
public Naanou.ResourceExchange.DownloadStartedEventHandler DownloadStarted
A download has started
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |