public class ApiUrlTestTask extends PleaseWaitRunnable
isSuccess()
replies true, otherwise false.Modifier and Type | Field and Description |
---|---|
private boolean |
canceled |
private HttpClient |
connection |
private Component |
parent |
private boolean |
success |
private String |
url |
progressMonitor
Constructor and Description |
---|
ApiUrlTestTask(Component parent,
String url)
Constructs a new
ApiUrlTestTask . |
Modifier and Type | Method and Description |
---|---|
protected void |
alertConnectionFailed() |
protected void |
alertInvalidCapabilities() |
protected void |
alertInvalidCapabilitiesUrl(String url) |
protected void |
alertInvalidServerResult(int retCode) |
protected void |
alertInvalidUrl(String url) |
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
protected String |
getNormalizedApiUrl()
Removes leading and trailing whitespace from the API URL and removes trailing '/'.
|
boolean |
isCanceled()
Determines if the test has been canceled.
|
boolean |
isSuccess()
Determines if the test has succeeded.
|
protected void |
realRun()
Called in the worker thread to do the actual work.
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
private boolean canceled
private boolean success
private HttpClient connection
public ApiUrlTestTask(Component parent, String url)
ApiUrlTestTask
.parent
- the parent component relative to which the PleaseWaitRunnable
-Dialog is displayedurl
- the url. Must not be null.IllegalArgumentException
- if url is null.protected void alertInvalidUrl(String url)
protected void alertInvalidCapabilitiesUrl(String url)
protected void alertConnectionFailed()
protected void alertInvalidServerResult(int retCode)
protected void alertInvalidCapabilities()
protected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected String getNormalizedApiUrl()
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 occurspublic boolean isCanceled()
true
if canceled, false
otherwisepublic boolean isSuccess()
true
if success, false
otherwise