- 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 Summary
Modifier and TypeMethodDescriptionvoid
addDownloadListener
(U url, DownloadListener<C> listener) Adds a download listener for asynchronous retrieval of resources (embedded images, etc.)Registers a source for downloading with this user agent.getResourceDownloader
(U url) Gets the resource downloader for the given source, creating one if none exists.
-
Method Details
-
download
Registers a source for downloading with this user agent.- Parameters:
url
- the source to be downloaded.- Returns:
- the downloader for the source.
-
addDownloadListener
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
Gets the resource downloader for the given source, creating one if none exists.- Parameters:
url
- the source.- Returns:
- the resource downloader.
-