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