public class DownloadRelationTask extends PleaseWaitRunnable
OsmDataLayer
Modifier and Type | Field and Description |
---|---|
private boolean |
canceled |
private Exception |
lastException |
private OsmDataLayer |
layer |
private OsmServerObjectReader |
objectReader |
private Collection<Relation> |
relations |
progressMonitor
Constructor and Description |
---|
DownloadRelationTask(Collection<Relation> relations,
OsmDataLayer layer)
Creates the download task
|
Modifier and Type | Method and Description |
---|---|
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
protected void |
realRun()
Called in the worker thread to do the actual work.
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
private boolean canceled
private Exception lastException
private final Collection<Relation> relations
private final OsmDataLayer layer
private OsmServerObjectReader objectReader
public DownloadRelationTask(Collection<Relation> relations, OsmDataLayer layer)
relations
- a collection of relations. Must not be null.layer
- the layer which data is to be merged intoIllegalArgumentException
- if relations is nullIllegalArgumentException
- if layer is nullprotected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected void realRun() throws SAXException, IOException, OsmTransferException
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
SAXException
- if a SAX error occursIOException
- if an I/O error occursOsmTransferException
- if a communication error with the OSM server occurs