public class StreetsideExportManager extends org.openstreetmap.josm.gui.PleaseWaitRunnable
StreetsideExportWriterThread and several
StreetsideExportDownloadThread. The second ones download every single
image that is going to be exported and stores them in an
ArrayBlockingQueue. Then it is picked by the first one and written on
the selected folder. Each image will be named by its key.| Modifier and Type | Field and Description |
|---|---|
private int |
amount |
private java.util.concurrent.ThreadPoolExecutor |
ex |
private java.util.Set<StreetsideAbstractImage> |
images |
(package private) static org.apache.log4j.Logger |
logger |
private java.lang.String |
path |
private java.util.concurrent.ArrayBlockingQueue<java.awt.image.BufferedImage> |
queue |
private java.util.concurrent.ArrayBlockingQueue<StreetsideAbstractImage> |
queueImages |
private java.lang.Thread |
writer |
| Constructor and Description |
|---|
StreetsideExportManager(java.util.List<StreetsideImportedImage> images)
Constructor used to rewrite imported images.
|
StreetsideExportManager(java.util.Set<StreetsideAbstractImage> images,
java.lang.String path)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
cancel() |
protected void |
finish() |
protected void |
realRun() |
static final org.apache.log4j.Logger logger
private final java.util.concurrent.ArrayBlockingQueue<java.awt.image.BufferedImage> queue
private final java.util.concurrent.ArrayBlockingQueue<StreetsideAbstractImage> queueImages
private int amount
private java.util.Set<StreetsideAbstractImage> images
private java.lang.String path
private java.lang.Thread writer
private java.util.concurrent.ThreadPoolExecutor ex
public StreetsideExportManager(java.util.Set<StreetsideAbstractImage> images, java.lang.String path)
images - Set of StreetsideAbstractImage objects to be exported.path - Export path.public StreetsideExportManager(java.util.List<StreetsideImportedImage> images) throws java.io.IOException
images - The set of StreetsideImportedImage object that is going to
be rewritten.java.io.IOException - If the file of one of the StreetsideImportedImage objects
doesn't contain a picture.protected void cancel()
cancel in class org.openstreetmap.josm.gui.PleaseWaitRunnableprotected void realRun() throws java.io.IOException
realRun in class org.openstreetmap.josm.gui.PleaseWaitRunnablejava.io.IOExceptionprotected void finish()
finish in class org.openstreetmap.josm.gui.PleaseWaitRunnable