xsul.http_client
Class HttpClientConnectionManager

java.lang.Object
  extended byxsul.http_client.HttpClientConnectionManager
Direct Known Subclasses:
ClientSocketConnection, HttpClientReuseLastConnectionManager

public class HttpClientConnectionManager
extends java.lang.Object

Manages connection.
NOTE: this class is multi-thread safe!

Version:
$Revision: 1.6 $
Author:
Aleksander Slominski

Method Summary
 HttpClientRequest connect(java.lang.String host, int port, int timeout)
          As defiend in Socket a timeout of zero is interpreted as an infinite timeout
static HttpClientConnectionManager newInstance()
           
static HttpClientConnectionManager newInstance(ClientSocketFactory socketFactory)
           
 void notifyConnectionForReuse(ClientSocketConnection conn)
          This method is called by HttpClientRequest/Response when HTTP request/response is finished and it is safe to assume that thsi particular conenctions is finished
 void shutdownAndReclaimResources()
          This method should be overriden by subclasses to free any resources that were not released.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInstance

public static HttpClientConnectionManager newInstance()

newInstance

public static HttpClientConnectionManager newInstance(ClientSocketFactory socketFactory)

connect

public HttpClientRequest connect(java.lang.String host,
                                 int port,
                                 int timeout)
                          throws HttpClientException
As defiend in Socket a timeout of zero is interpreted as an infinite timeout

Throws:
HttpClientException

notifyConnectionForReuse

public void notifyConnectionForReuse(ClientSocketConnection conn)
                              throws HttpClientException
This method is called by HttpClientRequest/Response when HTTP request/response is finished and it is safe to assume that thsi particular conenctions is finished

Throws:
HttpClientException

shutdownAndReclaimResources

public void shutdownAndReclaimResources()
                                 throws HttpClientException
This method should be overriden by subclasses to free any resources that were not released. This simple class has no resources to reclaim - this manager (factory) is stateless.

Throws:
HttpClientException


IU Extreme! Lab (http://www.extreme.indiana.edu)