public class TestAccessTokenTask extends PleaseWaitRunnable
| Modifier and Type | Field and Description |
|---|---|
private String |
apiUrl |
private boolean |
canceled |
private HttpClient |
connection |
private OAuthParameters |
oauthParameters |
private Component |
parent |
private OAuthToken |
token |
progressMonitor| Constructor and Description |
|---|
TestAccessTokenTask(Component parent,
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 String |
normalizeApiUrl(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 HttpClient connection
public TestAccessTokenTask(Component parent, 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 String normalizeApiUrl(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 SAXException, IOException, OsmTransferException
PleaseWaitRunnablerealRun in class PleaseWaitRunnableSAXException - if a SAX error occursIOException - if an I/O error occursOsmTransferException - if a communication error with the OSM server occurs