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 RIDCHttpClient
cookie
- public void clear()
clear
in interface RIDCHttpClient
public List<RIDCCookie> getCookies()
getCookies
in interface RIDCHttpClient
public void resetState()
resetState
in interface RIDCHttpClient
public void setAuthenticationPreemptive(boolean authPremptive)
setAuthenticationPreemptive
in interface RIDCHttpClient
authPremptive
- public void setCredentials(String scope, Credentials idcCredentials)
setCredentials
in interface RIDCHttpClient
scope
- idcCredentials
- public void setProxy(String proxyHost, int proxyPort, String proxyUsername, String proxyPassword, String proxyRealm)
setProxy
in interface RIDCHttpClient
proxyHost
- 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 RIDCHttpClient
socketTimeout
- timeout value on milli secondspublic HttpApache4GetMethod getGetMethod(String url)
getGetMethod
in interface RIDCHttpClient
url
- the urlpublic HttpApache4PostMethod getPostMethod(String url)
getPostMethod
in interface RIDCHttpClient
url
- the urlpublic org.apache.http.impl.client.DefaultHttpClient getDelegateObject()
getDelegateObject
in interface RIDCHttpClient