Class CachedAttributionBingAerialTileSource.AttributionTimerTask

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.atomic.AtomicReference<java.util.List<org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource.Attribution>> attributions  
      private java.util.concurrent.CountDownLatch finished  
      private ProgressMonitor monitor  
      private java.util.Timer timer  
      private int waitTimeSec  
    • Constructor Summary

      Constructors 
      Constructor Description
      AttributionTimerTask​(ProgressMonitor monitor, java.util.Timer timer, int waitTimeSec, java.util.concurrent.atomic.AtomicReference<java.util.List<org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource.Attribution>> attributions, java.util.concurrent.CountDownLatch finished)
      Create a new task for fetching Bing attribution data
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()  
      • Methods inherited from class java.util.TimerTask

        cancel, scheduledExecutionTime
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • timer

        private final java.util.Timer timer
      • attributions

        private final java.util.concurrent.atomic.AtomicReference<java.util.List<org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource.Attribution>> attributions
      • finished

        private final java.util.concurrent.CountDownLatch finished
    • Constructor Detail

      • AttributionTimerTask

        AttributionTimerTask​(ProgressMonitor monitor,
                             java.util.Timer timer,
                             int waitTimeSec,
                             java.util.concurrent.atomic.AtomicReference<java.util.List<org.openstreetmap.gui.jmapviewer.tilesources.BingAerialTileSource.Attribution>> attributions,
                             java.util.concurrent.CountDownLatch finished)
        Create a new task for fetching Bing attribution data
        Parameters:
        monitor - The monitor to update and use for cancellations
        timer - The timer thread to add the next task to, if this task failed to fetch the attribution data
        waitTimeSec - The time this task is waiting in seconds prior to execution
        attributions - The reference to put attributions in
        finished - Set to true when we have successfully fetched attributions or fetching has been cancelled.
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in class java.util.TimerTask