public class HttpApache3Client extends Object implements RIDCHttpClient
Constructor and Description |
---|
HttpApache3Client(boolean multithreaded)
Create a Apache3 Client
|
Modifier and Type | Method and Description |
---|---|
void |
addCookie(RIDCCookie cookie)
Add a cookie to this client
|
void |
clear()
Clear the parameters from the client instance
|
List<RIDCCookie> |
getCookies()
Get the Cookies
|
org.apache.commons.httpclient.HttpClient |
getDelegateObject()
Returns the underlying client object
|
HttpApache3GetMethod |
getGetMethod(String url)
Get a method which can do "GET" request
|
HttpApache3PostMethod |
getPostMethod(String url)
Get the method of POST requests
|
void |
resetState()
Reset the Http State of the client
|
void |
setAuthenticationPreemptive(boolean preemptive)
Set if the basic auth should be preemptive
|
void |
setCredentials(String any,
Credentials idcCredentials)
Set the credentials
|
void |
setProxy(String proxyHost,
int proxyPort,
String proxyUsername,
String proxyPassword,
String proxyRealm)
Set the proxy
|
void |
setSocketTimeout(int socketTimeout)
Set the socket timeout for this client
|
public HttpApache3Client(boolean multithreaded)
multithreaded
- public void clear()
clear
in interface RIDCHttpClient
public void setSocketTimeout(int socketTimeout)
setSocketTimeout
in interface RIDCHttpClient
socketTimeout
- timeout value on milli secondspublic 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 setCredentials(String any, Credentials idcCredentials)
setCredentials
in interface RIDCHttpClient
any
- idcCredentials
- public void setAuthenticationPreemptive(boolean preemptive)
setAuthenticationPreemptive
in interface RIDCHttpClient
preemptive
- public List<RIDCCookie> getCookies()
getCookies
in interface RIDCHttpClient
public void addCookie(RIDCCookie cookie)
addCookie
in interface RIDCHttpClient
cookie
- public void resetState()
resetState
in interface RIDCHttpClient
public HttpApache3GetMethod getGetMethod(String url)
getGetMethod
in interface RIDCHttpClient
url
- the urlpublic HttpApache3PostMethod getPostMethod(String url)
getPostMethod
in interface RIDCHttpClient
url
- the urlpublic org.apache.commons.httpclient.HttpClient getDelegateObject()
getDelegateObject
in interface RIDCHttpClient