public class TestAccessTokenTask extends PleaseWaitRunnable
| Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
apiUrl |
private boolean |
canceled |
private java.net.HttpURLConnection |
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(java.net.HttpURLConnection con) |
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, runprivate OAuthToken token
private OAuthParameters oauthParameters
private boolean canceled
private java.awt.Component parent
private java.lang.String apiUrl
private java.net.HttpURLConnection 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(java.net.HttpURLConnection con) throws OAuthException
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.SAXExceptionjava.io.IOExceptionOsmTransferException