Interface ResourceAgent<C,U>

Type Parameters:
C - The device-specific resource class (typically an image).
U - The object containing source information (typically an URL).

public interface ResourceAgent<C,U>
Agent for retrieving and handling embeddable device-specific resources (like images).
  • Method Details

    • download

      ResourceDownloader<C> download(U url)
      Registers a source for downloading with this user agent.
      Parameters:
      url - the source to be downloaded.
      Returns:
      the downloader for the source.
    • addDownloadListener

      void addDownloadListener(U url, DownloadListener<C> listener)
      Adds a download listener for asynchronous retrieval of resources (embedded images, etc.)

      In the process, it creates a resource downloader object.

      Parameters:
      url - the source to download from.
      listener - the download listener.
    • getResourceDownloader

      ResourceDownloader<C> getResourceDownloader(U url)
      Gets the resource downloader for the given source, creating one if none exists.
      Parameters:
      url - the source.
      Returns:
      the resource downloader.