Class BulkRetrievalThread

    • Field Detail

      • RETRIEVAL_SERVICE_POLL_DELAY

        protected int RETRIEVAL_SERVICE_POLL_DELAY
      • sector

        protected final Sector sector
      • resolution

        protected final double resolution
      • progress

        protected final Progress progress
      • fileStore

        protected final FileStore fileStore
      • retrievalListeners

        protected javax.swing.event.EventListenerList retrievalListeners
    • Constructor Detail

      • BulkRetrievalThread

        public BulkRetrievalThread​(BulkRetrievable retrievable,
                                   Sector sector,
                                   double resolution,
                                   FileStore fileStore,
                                   BulkRetrievalListener listener)
        Construct a thread that attempts to download to a specified 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.

        Parameters:
        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.
        Throws:
        java.lang.IllegalArgumentException - if either the retrievable, sector or file store are null, or the resolution is less than or equal to zero.
    • Method Detail

      • run

        public abstract void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • getSector

        public Sector getSector()
        Get the requested Sector.
        Returns:
        the requested Sector.
      • getResolution

        public double getResolution()
        Get the requested resolution.
        Returns:
        the requested resolution.
      • getFileStore

        public FileStore getFileStore()
        Get the file store.
        Returns:
        the file store associated with this downloader.
      • getProgress

        public Progress getProgress()
        Get a Progress instance providing information about this task progress.
        Returns:
        a Progress instance providing information about this task progress.
      • hasRetrievalListeners

        protected boolean hasRetrievalListeners()
      • callRetrievalListeners

        protected void callRetrievalListeners​(BulkRetrievalEvent event)