Save This Page
Home » commons-httpclient-3.1-src » org.apache.commons » httpclient » [javadoc | source]
org.apache.commons.httpclient
public class: HttpClient [javadoc | source]
java.lang.Object
   org.apache.commons.httpclient.HttpClient

An HTTP "user-agent", containing an HTTP state and one or more HTTP connections , to which HTTP methods can be applied.

Constructor:
 public HttpClient() 
 public HttpClient(HttpClientParams params) 
    Creates an instance of HttpClient using the given parameter set .
 public HttpClient(HttpConnectionManager httpConnectionManager) 
 public HttpClient(HttpClientParams params,
    HttpConnectionManager httpConnectionManager) 
Method from org.apache.commons.httpclient.HttpClient Summary:
executeMethod,   executeMethod,   executeMethod,   getHost,   getHostConfiguration,   getHttpConnectionManager,   getParams,   getPort,   getState,   isStrictMode,   setConnectionTimeout,   setHostConfiguration,   setHttpConnectionFactoryTimeout,   setHttpConnectionManager,   setParams,   setState,   setStrictMode,   setTimeout
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.commons.httpclient.HttpClient Detail:
 public int executeMethod(HttpMethod method) throws IOException, HttpException 
 public int executeMethod(HostConfiguration hostConfiguration,
    HttpMethod method) throws IOException, HttpException 
 public int executeMethod(HostConfiguration hostconfig,
    HttpMethod method,
    HttpState state) throws IOException, HttpException 
 public String getHost() 
Deprecated! use - #getHostConfiguration()

    Returns the default host.
 public synchronized HostConfiguration getHostConfiguration() 
 public synchronized HttpConnectionManager getHttpConnectionManager() 
 public HttpClientParams getParams() 
 public int getPort() 
Deprecated! use - #getHostConfiguration()

    Returns the default port.
 public synchronized HttpState getState() 
    Returns HTTP state associated with the HttpClient.
 public synchronized boolean isStrictMode() 
Deprecated! Use - org.apache.commons.httpclient.params.HttpClientParams#getParameter(String) to exercise a more granular control over HTTP protocol strictness.

    Returns the value of the strict mode flag.
 public synchronized  void setConnectionTimeout(int newTimeoutInMilliseconds) 
Deprecated! Use - org.apache.commons.httpclient.params.HttpConnectionManagerParams#setConnectionTimeout(int) , HttpConnectionManager#getParams() .

    Sets the timeout until a connection is etablished. A value of zero means the timeout is not used. The default value is zero.
 public synchronized  void setHostConfiguration(HostConfiguration hostConfiguration) 
 public synchronized  void setHttpConnectionFactoryTimeout(long timeout) 
Deprecated! Use - org.apache.commons.httpclient.params.HttpClientParams#setConnectionManagerTimeout(long) , HttpClient#getParams()

 public synchronized  void setHttpConnectionManager(HttpConnectionManager httpConnectionManager) 
 public  void setParams(HttpClientParams params) 
 public synchronized  void setState(HttpState state) 
 public synchronized  void setStrictMode(boolean strictMode) 
Deprecated! Use - HttpClientParams#setParameter(String, Object) to exercise a more granular control over HTTP protocol strictness.

    Defines how strictly the method follows the HTTP protocol specification (see RFC 2616 and other relevant RFCs). In the strict mode the method precisely implements the requirements of the specification, whereas in non-strict mode it attempts to mimic the exact behaviour of commonly used HTTP agents, which many HTTP servers expect.
 public synchronized  void setTimeout(int newTimeoutInMilliseconds) 
Deprecated! Use - org.apache.commons.httpclient.params.HttpConnectionManagerParams#setSoTimeout(int) , HttpConnectionManager#getParams() .

    Sets the socket timeout (SO_TIMEOUT) in milliseconds which is the timeout for waiting for data. A timeout value of zero is interpreted as an infinite timeout.