public class HttpApache4Client extends Object implements RIDCHttpClient
| Constructor and Description |
|---|
HttpApache4Client()
Create the client
|
| 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
|
org.apache.http.impl.client.DefaultHttpClient |
getDelegateObject()
Returns the underlying client object
|
HttpApache4GetMethod |
getGetMethod(String url)
Get the method to execute for HTTP GET
|
HttpApache4PostMethod |
getPostMethod(String url)
Get the method to execute for HTTP POST
|
void |
resetState()
Reset the state of the connection
|
void |
setAuthenticationPreemptive(boolean authPremptive)
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 void addCookie(RIDCCookie cookie)
addCookie in interface RIDCHttpClientcookie -public void clear()
clear in interface RIDCHttpClientpublic List<RIDCCookie> getCookies()
getCookies in interface RIDCHttpClientpublic void resetState()
resetState in interface RIDCHttpClientpublic void setAuthenticationPreemptive(boolean authPremptive)
setAuthenticationPreemptive in interface RIDCHttpClientauthPremptive -public void setCredentials(String scope, Credentials idcCredentials)
setCredentials in interface RIDCHttpClientscope -idcCredentials -public void setProxy(String proxyHost, int proxyPort, String proxyUsername, String proxyPassword, String proxyRealm)
setProxy 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)
setSocketTimeout in interface RIDCHttpClientsocketTimeout - timeout value on milli secondspublic HttpApache4GetMethod getGetMethod(String url)
getGetMethod in interface RIDCHttpClienturl - the urlpublic HttpApache4PostMethod getPostMethod(String url)
getPostMethod in interface RIDCHttpClienturl - the urlpublic org.apache.http.impl.client.DefaultHttpClient getDelegateObject()
getDelegateObject in interface RIDCHttpClient