public class TestAccessTokenTask extends PleaseWaitRunnable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
apiUrl |
private boolean |
canceled |
private HttpClient |
connection |
private OAuthParameters |
oauthParameters |
private java.awt.Component |
parent |
private OAuthToken |
token |
progressMonitor
Constructor and Description |
---|
TestAccessTokenTask(java.awt.Component parent,
java.lang.String apiUrl,
OAuthParameters parameters,
OAuthToken accessToken)
Create the task
|
Modifier and Type | Method and Description |
---|---|
protected void |
alertFailedAuthentication() |
protected void |
alertFailedAuthorisation() |
protected void |
alertFailedConnection() |
protected void |
alertFailedSigning() |
protected void |
alertInternalError() |
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
protected UserInfo |
getUserDetails() |
protected java.lang.String |
normalizeApiUrl(java.lang.String url) |
protected void |
notifySuccess(UserInfo userInfo) |
protected void |
realRun()
Called in the worker thread to do the actual work.
|
protected void |
sign(HttpClient con) |
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, run
private final OAuthToken token
private final OAuthParameters oauthParameters
private boolean canceled
private final java.awt.Component parent
private final java.lang.String apiUrl
private HttpClient connection
public TestAccessTokenTask(java.awt.Component parent, java.lang.String apiUrl, OAuthParameters parameters, OAuthToken accessToken)
parent
- the parent component relative to which the PleaseWaitRunnable
-Dialog is displayedapiUrl
- the API URL. Must not be null.parameters
- the OAuth parameters. Must not be null.accessToken
- the Access Token. Must not be null.protected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected void sign(HttpClient con) throws OAuthException
OAuthException
protected java.lang.String normalizeApiUrl(java.lang.String url)
protected UserInfo getUserDetails() throws OsmOAuthAuthorizationException, XmlParsingException, OsmTransferException
protected void notifySuccess(UserInfo userInfo)
protected void alertFailedAuthentication()
protected void alertFailedAuthorisation()
protected void alertFailedConnection()
protected void alertFailedSigning()
protected void alertInternalError()
protected void realRun() throws org.xml.sax.SAXException, java.io.IOException, OsmTransferException
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
org.xml.sax.SAXException
- if a SAX error occursjava.io.IOException
- if an I/O error occursOsmTransferException
- if a communication error with the OSM server occurs