org.sblim.wbem.http
Class HttpClientPool

java.lang.Object
  extended by org.sblim.wbem.http.HttpClientPool

public class HttpClientPool
extends java.lang.Object


Constructor Summary
HttpClientPool()
           
 
Method Summary
 boolean addConnectionToPool(HttpClient httpClient)
          Add the connection to the pool, but does NOT add it as available connection.
 void closePool()
           
protected  void finalize()
           
 int getNumberOfAllConnections()
          Returns the number of connections in this pool that are available/free for (re-)use.
 int getNumberOfAvailableConnections()
          Returns the number of all connections in this pool.
 SessionProperties getSessionProperties()
           
 boolean removeConnectionFromPool(HttpClient httpClient)
          Removes a connection completly from the pool.
 HttpClient retrieveAvailableConnectionFromPool()
           
 boolean returnAvailableConnectionToPool(HttpClient httpClient)
          Add the connection to the pool.
 void setSessionProperties(SessionProperties pSessionProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpClientPool

public HttpClientPool()
Method Detail

getNumberOfAllConnections

public int getNumberOfAllConnections()
Returns the number of connections in this pool that are available/free for (re-)use.

Returns:
number of available/free connections in pool

getNumberOfAvailableConnections

public int getNumberOfAvailableConnections()
Returns the number of all connections in this pool.

Returns:
number of all connections in pool

getSessionProperties

public SessionProperties getSessionProperties()

setSessionProperties

public void setSessionProperties(SessionProperties pSessionProperties)

retrieveAvailableConnectionFromPool

public HttpClient retrieveAvailableConnectionFromPool()

returnAvailableConnectionToPool

public boolean returnAvailableConnectionToPool(HttpClient httpClient)
Add the connection to the pool. Connection is added as available connection. Use method addConnectionToPool(HttpClient) to add the connection without being available for reuse.

Parameters:
httpClient - connection that is to be added to the pool
Returns:
true if connection was added otherwise false

addConnectionToPool

public boolean addConnectionToPool(HttpClient httpClient)
Add the connection to the pool, but does NOT add it as available connection. Use method returnAvailableConnectionToPool(HttpClient) to also add the connection to the available connections.

Parameters:
httpClient - connection that is to be added to the pool
Returns:
true if connection was added otherwise false

removeConnectionFromPool

public boolean removeConnectionFromPool(HttpClient httpClient)
Removes a connection completly from the pool.

Parameters:
httpClient - connection that is to be removed from the pool
Returns:
true if connection was removed otherwise false

closePool

public void closePool()

finalize

protected void finalize()
Overrides:
finalize in class java.lang.Object


Copyright © 2005, 2006 IBM Corporation. All Rights Reserved.