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, runprivate 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()
PleaseWaitRunnablecancel in class PleaseWaitRunnableprotected void finish()
PleaseWaitRunnablefinish in class PleaseWaitRunnableprotected void sign(HttpClient con) throws oauth.signpost.exception.OAuthException
oauth.signpost.exception.OAuthExceptionprotected 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
PleaseWaitRunnablerealRun in class PleaseWaitRunnableorg.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