org.webharvest.runtime.web
Class HttpClientManager

java.lang.Object
  extended by org.webharvest.runtime.web.HttpClientManager

public class HttpClientManager
extends java.lang.Object

HTTP client functionality.


Field Summary
static java.lang.String DEFAULT_USER_AGENT
           
 
Constructor Summary
HttpClientManager()
          Constructor.
 
Method Summary
 HttpResponseWrapper execute(java.lang.String methodType, boolean multipart, java.lang.String url, java.lang.String charset, java.lang.String username, java.lang.String password, java.util.Map<java.lang.String,HttpParamInfo> params, java.util.Map headers)
           
 org.apache.commons.httpclient.HttpClient getHttpClient()
           
 HttpInfo getHttpInfo()
           
 void setCookiePolicy(java.lang.String cookiePolicy)
           
 void setHttpProxy(java.lang.String hostName)
          Defines HTTP proxy for the client with specified host
 void setHttpProxy(java.lang.String hostName, int hostPort)
          Defines HTTP proxy for the client with specified host and port
 void setHttpProxyCredentials(java.lang.String username, java.lang.String password, java.lang.String host, java.lang.String domain)
          Defines user credintials for the HTTP proxy server
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_USER_AGENT

public static final java.lang.String DEFAULT_USER_AGENT
See Also:
Constant Field Values
Constructor Detail

HttpClientManager

public HttpClientManager()
Constructor.

Method Detail

setCookiePolicy

public void setCookiePolicy(java.lang.String cookiePolicy)

setHttpProxy

public void setHttpProxy(java.lang.String hostName,
                         int hostPort)
Defines HTTP proxy for the client with specified host and port

Parameters:
hostName -
hostPort -

setHttpProxy

public void setHttpProxy(java.lang.String hostName)
Defines HTTP proxy for the client with specified host

Parameters:
hostName -

setHttpProxyCredentials

public void setHttpProxyCredentials(java.lang.String username,
                                    java.lang.String password,
                                    java.lang.String host,
                                    java.lang.String domain)
Defines user credintials for the HTTP proxy server

Parameters:
username -
password -

execute

public HttpResponseWrapper execute(java.lang.String methodType,
                                   boolean multipart,
                                   java.lang.String url,
                                   java.lang.String charset,
                                   java.lang.String username,
                                   java.lang.String password,
                                   java.util.Map<java.lang.String,HttpParamInfo> params,
                                   java.util.Map headers)

getHttpClient

public org.apache.commons.httpclient.HttpClient getHttpClient()

getHttpInfo

public HttpInfo getHttpInfo()