public class StreetsideExportManager extends 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 ThreadPoolExecutor |
ex |
private Set<StreetsideAbstractImage> |
images |
private String |
path |
private ArrayBlockingQueue<BufferedImage> |
queue |
private ArrayBlockingQueue<StreetsideAbstractImage> |
queueImages |
private Thread |
writer |
progressMonitor
Constructor and Description |
---|
StreetsideExportManager(List<StreetsideImportedImage> images)
Constructor used to rewrite imported images.
|
StreetsideExportManager(Set<StreetsideAbstractImage> images,
String path)
Main constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cancel() |
protected void |
finish() |
protected void |
realRun() |
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
private final ArrayBlockingQueue<BufferedImage> queue
private final ArrayBlockingQueue<StreetsideAbstractImage> queueImages
private int amount
private Set<StreetsideAbstractImage> images
private ThreadPoolExecutor ex
public StreetsideExportManager(Set<StreetsideAbstractImage> images, String path)
images
- Set of StreetsideAbstractImage
objects to be exported.path
- Export path.public StreetsideExportManager(List<StreetsideImportedImage> images) throws IOException
images
- The set of StreetsideImportedImage
object that is going to
be rewritten.IOException
- If the file of one of the StreetsideImportedImage
objects
doesn't contain a picture.protected void cancel()
cancel
in class PleaseWaitRunnable
protected void realRun() throws IOException
realRun
in class PleaseWaitRunnable
IOException
protected void finish()
finish
in class PleaseWaitRunnable