public class RetrieveAccessTokenTask extends PleaseWaitRunnable
Modifier and Type | Field and Description |
---|---|
private OAuthToken |
accessToken |
private boolean |
canceled |
private OsmOAuthAuthorizationClient |
client |
private OAuthParameters |
parameters |
private Component |
parent |
private OAuthToken |
requestToken |
progressMonitor
Constructor and Description |
---|
RetrieveAccessTokenTask(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, run
private boolean canceled
private OAuthToken accessToken
private OAuthParameters parameters
private OsmOAuthAuthorizationClient client
private OAuthToken requestToken
public RetrieveAccessTokenTask(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.IllegalArgumentException
- thrown if parameters is null.IllegalArgumentException
- thrown if requestToken is null.protected void cancel()
PleaseWaitRunnable
cancel
in class PleaseWaitRunnable
protected void finish()
PleaseWaitRunnable
finish
in class PleaseWaitRunnable
protected void alertRetrievingAccessTokenFailed(OsmOAuthAuthorizationException e)
protected void realRun() throws SAXException, IOException, OsmTransferException
PleaseWaitRunnable
realRun
in class PleaseWaitRunnable
SAXException
IOException
OsmTransferException
public boolean isCanceled()
true
if user aborted operationpublic OAuthToken getAccessToken()