public class RetrieveAccessTokenTask extends PleaseWaitRunnable
| Modifier and Type | Field and Description |
|---|---|
private OAuthToken |
accessToken |
private boolean |
canceled |
private OsmOAuthAuthorizationClient |
client |
private OAuthParameters |
parameters |
private java.awt.Component |
parent |
private OAuthToken |
requestToken |
progressMonitor| Constructor and Description |
|---|
RetrieveAccessTokenTask(java.awt.Component parent,
OAuthParameters parameters,
OAuthToken requestToken)
Creates the task
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
alertRetrievingAccessTokenFailed(OsmOAuthAuthorizationException e) |
protected void |
cancel()
User pressed cancel button.
|
protected void |
finish()
Finish up the data work.
|
OAuthToken |
getAccessToken()
Replies the retrieved Access Token.
|
boolean |
isCanceled()
Replies true if the task was canceled.
|
protected void |
realRun()
Called in the worker thread to do the actual work.
|
afterFinish, canRunInBackground, getProgressMonitor, operationCanceled, runprivate boolean canceled
private OAuthToken accessToken
private OAuthParameters parameters
private OsmOAuthAuthorizationClient client
private OAuthToken requestToken
private java.awt.Component parent
public RetrieveAccessTokenTask(java.awt.Component parent, OAuthParameters parameters, OAuthToken requestToken)
parent - the parent component relative to which the PleaseWaitRunnable-Dialog
is displayedparameters - the OAuth parameters. Must not be null.requestToken - the request token for which an Access Token is retrieved. Must not be null.java.lang.IllegalArgumentException - thrown if parameters is null.java.lang.IllegalArgumentException - thrown if requestToken is null.protected void cancel()
PleaseWaitRunnablecancel in class PleaseWaitRunnableprotected void finish()
PleaseWaitRunnablefinish in class PleaseWaitRunnableprotected void alertRetrievingAccessTokenFailed(OsmOAuthAuthorizationException e)
protected void realRun() throws org.xml.sax.SAXException, java.io.IOException, OsmTransferException
PleaseWaitRunnablerealRun in class PleaseWaitRunnableorg.xml.sax.SAXExceptionjava.io.IOExceptionOsmTransferExceptionpublic boolean isCanceled()
true if user aborted operationpublic OAuthToken getAccessToken()