Ejemplo n.º 1
0
 @Override
 protected void cancel() {
   canceled = true;
   synchronized (this) {
     if (reader != null) {
       reader.cancel();
     }
   }
 }
Ejemplo n.º 2
0
 @Override
 protected void realRun() throws SAXException, IOException, OsmTransferException {
   try {
     synchronized (this) {
       reader = new OsmServerChangesetReader();
     }
     downloadedChangesets = new HashSet<Changeset>();
     downloadedChangesets.addAll(
         reader.readChangesets(
             idsToDownload, getProgressMonitor().createSubTaskMonitor(0, false)));
   } catch (OsmTransferException e) {
     if (canceled)
       // ignore exception if canceled
       return;
     // remember other exceptions
     lastException = e;
   }
 }