org.littleshoot.util
Class DefaultHttpClientImpl

java.lang.Object
  extended by org.littleshoot.util.DefaultHttpClientImpl
All Implemented Interfaces:
DefaultHttpClient

public class DefaultHttpClientImpl
extends Object
implements DefaultHttpClient

Class for keeping track of HttpClient connections created. This provides access to the underlying HttpConnection instances for things such as closing the connection. This also allows the setting of general properties for connections we create.


Constructor Summary
DefaultHttpClientImpl()
          Creates a new manager.
DefaultHttpClientImpl(org.apache.commons.httpclient.HttpConnectionManager connectionManager)
          Creates a new manager using a custom HttpConnectionManager instance.
 
Method Summary
 int executeMethod(org.apache.commons.httpclient.HttpMethod method)
           
 org.apache.commons.httpclient.HttpMethod get(String url)
           
 org.apache.commons.httpclient.HostConfiguration getHostConfiguration()
           
 org.apache.commons.httpclient.HttpConnectionManager getHttpConnectionManager()
           
 org.apache.commons.httpclient.params.HttpClientParams getParams()
           
 org.apache.commons.httpclient.HttpState getState()
           
 org.apache.commons.httpclient.HttpMethod post(String url)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultHttpClientImpl

public DefaultHttpClientImpl(org.apache.commons.httpclient.HttpConnectionManager connectionManager)
Creates a new manager using a custom HttpConnectionManager instance.

Parameters:
connectionManager - The HttpConnectionManager to use.

DefaultHttpClientImpl

public DefaultHttpClientImpl()
Creates a new manager.

Method Detail

get

public org.apache.commons.httpclient.HttpMethod get(String url)
                                             throws org.apache.commons.httpclient.HttpException,
                                                    IOException
Specified by:
get in interface DefaultHttpClient
Throws:
org.apache.commons.httpclient.HttpException
IOException

post

public org.apache.commons.httpclient.HttpMethod post(String url)
                                              throws org.apache.commons.httpclient.HttpException,
                                                     IOException
Specified by:
post in interface DefaultHttpClient
Throws:
org.apache.commons.httpclient.HttpException
IOException

executeMethod

public int executeMethod(org.apache.commons.httpclient.HttpMethod method)
                  throws org.apache.commons.httpclient.HttpException,
                         IOException
Specified by:
executeMethod in interface DefaultHttpClient
Throws:
org.apache.commons.httpclient.HttpException
IOException

getHttpConnectionManager

public org.apache.commons.httpclient.HttpConnectionManager getHttpConnectionManager()
Specified by:
getHttpConnectionManager in interface DefaultHttpClient

getParams

public org.apache.commons.httpclient.params.HttpClientParams getParams()
Specified by:
getParams in interface DefaultHttpClient

getState

public org.apache.commons.httpclient.HttpState getState()
Specified by:
getState in interface DefaultHttpClient

getHostConfiguration

public org.apache.commons.httpclient.HostConfiguration getHostConfiguration()
Specified by:
getHostConfiguration in interface DefaultHttpClient


Copyright © 2011-2013 LittleShoot. All Rights Reserved.