public class HttpURLConnectionClient extends Object implements RIDCHttpClient
HttpURLConnection| Constructor and Description |
|---|
HttpURLConnectionClient(IdcHttpClientConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCookie(RIDCCookie cookie)
Add cookie to the connection
|
void |
clear()
Clear the params and headers from the connection
|
List<RIDCCookie> |
getCookies()
Get the cookies from the connection
|
Object |
getDelegateObject()
Returns the underlying client object
|
HttpURLConnectionGetMethod |
getGetMethod(String url)
Get the method to execute for HTTP GET
|
HttpURLConnectionPostMethod |
getPostMethod(String url)
Get the method to execute for HTTP POST
|
void |
resetState()
Reset the state of the connection
|
void |
setAuthenticationPreemptive(boolean b)
Set authentication preemptive
|
void |
setCredentials(String scope, Credentials idcCredentials)
Set credentials for the connection
|
void |
setProxy(String proxyHost, int proxyPort, String proxyUsername, String proxyPassword, String proxyRealm)
Set proxy for the connection
|
void |
setSocketTimeout(int socketTimeout)
Set the socket timeout
|
public HttpURLConnectionClient(IdcHttpClientConfig config) throws IdcClientException
IdcClientExceptionpublic void addCookie(RIDCCookie cookie)
RIDCHttpClientaddCookie in interface RIDCHttpClientpublic void clear()
RIDCHttpClientclear in interface RIDCHttpClientpublic List<RIDCCookie> getCookies()
RIDCHttpClientgetCookies in interface RIDCHttpClientpublic void resetState()
RIDCHttpClientresetState in interface RIDCHttpClientpublic void setAuthenticationPreemptive(boolean b)
RIDCHttpClientsetAuthenticationPreemptive in interface RIDCHttpClientpublic void setCredentials(String scope, Credentials idcCredentials)
RIDCHttpClientsetCredentials in interface RIDCHttpClientpublic void setProxy(String proxyHost, int proxyPort, String proxyUsername, String proxyPassword, String proxyRealm)
RIDCHttpClientsetProxy in interface RIDCHttpClientproxyHost - proxy host nameproxyPort - proxy host portproxyUsername - proxy user name, null if not requiredproxyPassword - proxy user password, null if not requiredproxyRealm - proxy realm, null if not requiredpublic void setSocketTimeout(int socketTimeout)
RIDCHttpClientsetSocketTimeout in interface RIDCHttpClientsocketTimeout - timeout value on milli secondspublic HttpURLConnectionGetMethod getGetMethod(String url)
RIDCHttpClientgetGetMethod in interface RIDCHttpClienturl - the urlpublic HttpURLConnectionPostMethod getPostMethod(String url)
RIDCHttpClientgetPostMethod in interface RIDCHttpClienturl - the urlpublic Object getDelegateObject()
RIDCHttpClientgetDelegateObject in interface RIDCHttpClient