public class OsmConnection extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HttpURLConnection |
activeConnection |
protected boolean |
cancel |
protected OAuthParameters |
oauthParameters |
| Constructor and Description |
|---|
OsmConnection() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAuth(HttpURLConnection connection) |
protected void |
addBasicAuthorizationHeader(HttpURLConnection con)
Adds an authentication header for basic authentication
|
protected void |
addOAuthAuthorizationHeader(HttpURLConnection connection)
Signs the connection with an OAuth authentication header
|
void |
cancel() |
boolean |
isCanceled()
Replies true if this connection is canceled
|
protected boolean cancel
protected HttpURLConnection activeConnection
protected OAuthParameters oauthParameters
public OsmConnection()
public void cancel()
protected void addBasicAuthorizationHeader(HttpURLConnection con) throws OsmTransferException
con - the connectionOsmTransferException - thrown if something went wrong. Check for nested exceptionsprotected void addOAuthAuthorizationHeader(HttpURLConnection connection) throws OsmTransferException
connection - the connectionOsmTransferException - thrown if there is currently no OAuth Access Token configuredOsmTransferException - thrown if signing failsprotected void addAuth(HttpURLConnection connection) throws OsmTransferException
OsmTransferExceptionpublic boolean isCanceled()