Interface DownloadManagerServiceMBean

All Known Implementing Classes:
DownloadManagerService

public interface DownloadManagerServiceMBean
This class is an MBean endpoint for communication with a front-end Admin UI which would show all current downloads across all users. The methods are ways to retrieve and manipulate the download data.
  • Method Details

    • getAllDownloadsStatus

      List<Map<String,String>> getAllDownloadsStatus()
      Function to get information about every download.
      Returns:
      Returns the information in an array of maps, where each map holds information about a specific download.
      See Also:
      • ReliableResourceStatus.DownloadStatus
    • getDownloadStatus

      Map<String,String> getDownloadStatus(String downloadIdentifier)
      Function to get information about a specific download.
      Parameters:
      downloadIdentifier - The randomly generated downloadId string assigned to the download at its start.
      Returns:
      Returns a map of attributes describing the download.
      See Also:
      • ReliableResourceStatus.DownloadStatus
    • getAllDownloads

      List<String> getAllDownloads()
      Function to get all downloads.
      Returns:
      Returns an array of downloadIdentifier Strings.
    • getAllDownloads

      List<String> getAllDownloads(String userId)
      Function to get all downloads for a specific user.
      Parameters:
      userId - The id of the user.
      Returns:
      Returns an array of downloadIdentifier Strings, similar to getAllDownloads().
    • removeDownloadInfo

      void removeDownloadInfo(String downloadIdentifier)
      Function to remove the map entry corresponding to the downloadIdentifier passed it. This means it will no longer be returned by getAllDownloadsStatus(), getAllDownloadsStatus(), {getAllDownloads(), or getAllDownloads(String).
      Parameters:
      downloadIdentifier - The randomly generated downloadId string assigned to the download at its start.
    • cancelDownload

      void cancelDownload(String userId, String downloadIdentifier)
      Function to cancel a download.
      Parameters:
      userId - The id of the user who is performing the download.
      downloadIdentifier - The randomly generated downloadId string assigned to the download at its start.