public class OsmConnection extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected HttpClient |
activeConnection |
protected boolean |
cancel |
protected OAuthParameters |
oauthParameters |
Constructor and Description |
---|
OsmConnection() |
Modifier and Type | Method and Description |
---|---|
protected void |
addAuth(HttpClient connection) |
protected void |
addBasicAuthorizationHeader(HttpClient con)
Adds an authentication header for basic authentication
|
protected void |
addOAuthAuthorizationHeader(HttpClient 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 HttpClient activeConnection
protected OAuthParameters oauthParameters
public OsmConnection()
public void cancel()
protected void addBasicAuthorizationHeader(HttpClient con) throws OsmTransferException
con
- the connectionOsmTransferException
- if something went wrong. Check for nested exceptionsprotected void addOAuthAuthorizationHeader(HttpClient connection) throws OsmTransferException
connection
- the connectionOsmTransferException
- if there is currently no OAuth Access Token configuredOsmTransferException
- if signing failsprotected void addAuth(HttpClient connection) throws OsmTransferException
OsmTransferException
public boolean isCanceled()