public abstract class BulkRetrievalThread extends Thread
BulkRetrievable
.Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected FileStore |
fileStore |
protected Progress |
progress |
protected double |
resolution |
protected BulkRetrievable |
retrievable |
protected int |
RETRIEVAL_SERVICE_POLL_DELAY |
protected EventListenerList |
retrievalListeners |
protected Sector |
sector |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
BulkRetrievalThread(BulkRetrievable retrievable,
Sector sector,
double resolution,
FileStore fileStore,
BulkRetrievalListener listener)
|
Modifier and Type | Method and Description |
---|---|
void |
addRetrievalListener(BulkRetrievalListener listener) |
protected void |
callRetrievalListeners(BulkRetrievalEvent event) |
FileStore |
getFileStore()
Get the file store.
|
Progress |
getProgress()
Get a
Progress instance providing information about this task progress. |
double |
getResolution()
Get the requested resolution.
|
BulkRetrievable |
getRetrievable()
Get the
BulkRetrievable instance for which this thread acts. |
Sector |
getSector()
Get the requested
Sector . |
protected boolean |
hasRetrievalListeners() |
void |
removeRetrievalListener(BulkRetrievalListener listener) |
abstract void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected final FileStore fileStore
protected final Progress progress
protected final double resolution
protected final BulkRetrievable retrievable
protected int RETRIEVAL_SERVICE_POLL_DELAY
protected EventListenerList retrievalListeners
protected final Sector sector
public BulkRetrievalThread(BulkRetrievable retrievable, Sector sector, double resolution, FileStore fileStore, BulkRetrievalListener listener)
FileStore
a retrievable's data for a given
Sector
and resolution.
This method creates and starts a thread to perform the download. A reference to the thread is returned. To create
a downloader that has not been started, construct a BasicElevationModelBulkDownloader
.
Note that the target resolution must be provided in radians of latitude per texel, which is the resolution in
meters divided by the globe radius.retrievable
- the retrievable to retrieve data for.sector
- the sector of interest.resolution
- the target resolution, provided in radians of latitude per texel.fileStore
- the file store to examine.listener
- an optional retrieval listener. May be null.IllegalArgumentException
- if either the retrievable, sector or file store are null, or the resolution is
less than or equal to zero.public void addRetrievalListener(BulkRetrievalListener listener)
protected void callRetrievalListeners(BulkRetrievalEvent event)
public FileStore getFileStore()
public Progress getProgress()
Progress
instance providing information about this task progress.Progress
instance providing information about this task progress.public double getResolution()
public BulkRetrievable getRetrievable()
BulkRetrievable
instance for which this thread acts.BulkRetrievable
instance.protected boolean hasRetrievalListeners()
public void removeRetrievalListener(BulkRetrievalListener listener)