public class DownloadManagerService extends Object implements DownloadManagerServiceMBean
| Constructor and Description |
|---|
DownloadManagerService(DownloadStatusInfo downloadStatusInfo) |
| Modifier and Type | Method and Description |
|---|---|
void |
cancelDownload(String userId,
String downloadIdentifier)
Function to cancel a download.
|
void |
destroy() |
List<String> |
getAllDownloads()
Function to get all downloads.
|
List<String> |
getAllDownloads(String userId)
Function to get all downloads for a specific user.
|
List<Map<String,String>> |
getAllDownloadsStatus()
Function to get information about every download.
|
Map<String,String> |
getDownloadStatus(String downloadIdentifier)
Function to get information about a specific download.
|
void |
init() |
void |
removeDownloadInfo(String downloadIdentifier)
Function to remove the map entry corresponding to the downloadIdentifer passed it.
|
public DownloadManagerService(DownloadStatusInfo downloadStatusInfo)
public void init()
public void destroy()
public List<Map<String,String>> getAllDownloadsStatus()
DownloadManagerServiceMBeangetAllDownloadsStatus in interface DownloadManagerServiceMBeanpublic Map<String,String> getDownloadStatus(String downloadIdentifier)
DownloadManagerServiceMBeangetDownloadStatus in interface DownloadManagerServiceMBeandownloadIdentifier - The randomly generated downloadId string assigned to the download at
its start.this.getAllDownloadsStatus for details.public List<String> getAllDownloads()
DownloadManagerServiceMBeangetAllDownloads in interface DownloadManagerServiceMBeanpublic List<String> getAllDownloads(String userId)
DownloadManagerServiceMBeangetAllDownloads in interface DownloadManagerServiceMBeanuserId - The id of the user.this.getAllDownloads.public void removeDownloadInfo(String downloadIdentifier)
DownloadManagerServiceMBeanthis.getAllDownloadsStatus, this.getDownloadStatus, or this.getAllDownloads.removeDownloadInfo in interface DownloadManagerServiceMBeandownloadIdentifier - The randomly generated downloadId string assigned to the download at
its start.public void cancelDownload(String userId, String downloadIdentifier)
DownloadManagerServiceMBeancancelDownload in interface DownloadManagerServiceMBeanuserId - The id of the user who is performing the download.downloadIdentifier - The randomly generated downloadId string assigned to the download at
its start.This work is licensed under a Creative Commons Attribution 4.0 International License.