org.sblim.wbem.http
Class HttpClientPool
java.lang.Object
org.sblim.wbem.http.HttpClientPool
public class HttpClientPool
extends java.lang.Object
HttpClientPool.java
(C) Copyright IBM Corp. 2005, 2007
THIS FILE IS PROVIDED UNDER THE TERMS OF THE COMMON PUBLIC LICENSE
("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THIS FILE
CONSTITUTES RECIPIENTS ACCEPTANCE OF THE AGREEMENT.
You can obtain a current copy of the Common Public License from
http://www.opensource.org/licenses/cpl1.0.php
closePool
public void closePool(boolean pKeepActive)
finalize
protected void finalize()
getNumberOfAllConnections
public int getNumberOfAllConnections()
Returns the number of connections in this pool that are available/free
for (re-)use.
- number of available/free connections in pool
getNumberOfAvailableConnections
public int getNumberOfAvailableConnections()
Returns the number of all connections in this pool.
- number of all connections in pool
getPoolSize
public int getPoolSize()
Returns poolSize
removeConnectionFromPool
public boolean removeConnectionFromPool(HttpClient httpClient)
Removes a connection completly from the pool. The connection is not
closed by this method, that has to be done by the caller.
httpClient
- connection that is to be removed from the pool
- true if connection was removed otherwise false
retrieveAvailableConnectionFromPool
public HttpClient retrieveAvailableConnectionFromPool(URI pUri,
AuthorizationHandler pHandler)
Returns the available connections of this pool for a given
URI&AuthorizationHandler
pUri
- The uripHandler
- The authoriaztion handler
- A connection if one is available,
null
otherwise
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.
httpClient
- connection that is to be added to the pool
- true if connection was added otherwise false
setSessionProperties
public void setSessionProperties(SessionProperties pSessionProperties)
Copyright © 2005, 2007 IBM Corporation. All Rights Reserved.