Class CachedAttributionBingAerialTileSource.AttributionTimerTask
- java.lang.Object
-
- java.util.TimerTask
-
- org.openstreetmap.josm.data.imagery.CachedAttributionBingAerialTileSource.AttributionTimerTask
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- CachedAttributionBingAerialTileSource
private class CachedAttributionBingAerialTileSource.AttributionTimerTask extends java.util.TimerTask
A timer task for fetching Bing attribution information
-
-
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()
-
-
-
Field Detail
-
monitor
private final ProgressMonitor monitor
-
timer
private final java.util.Timer timer
-
waitTimeSec
private final int waitTimeSec
-
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 cancellationstimer
- The timer thread to add the next task to, if this task failed to fetch the attribution datawaitTimeSec
- The time this task is waiting in seconds prior to executionattributions
- The reference to put attributions infinished
- Set totrue
when we have successfully fetched attributions or fetching has been cancelled.
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
- Specified by:
run
in classjava.util.TimerTask
-
-