public class Downloader<T> extends Object
Constructor and Description |
---|
Downloader(String dataDescription,
java.util.concurrent.Callable<T> supplier)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionListener(ActionListener l)
Adds a listener that will be notified when the data has become
available.
|
T |
getData()
Immediately returns the downloaded data, or null if it has not been
downloaded, or if a download has failed.
|
void |
removeActionListener(ActionListener l)
Removes a listener previously added.
|
void |
start()
Ensures that this downloader has started to downloading the data.
|
public Downloader(String dataDescription, java.util.concurrent.Callable<T> supplier)
dataDescription
- short description of downloaded data,
may be used in logging messagessupplier
- supplier of downloaded datapublic void start()
public T getData()
public void addActionListener(ActionListener l)
l
- listenerpublic void removeActionListener(ActionListener l)
l
- listenerCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.