Class HttpClientPool
java.lang.Object
org.sblim.wbem.http.HttpClientPool
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclosePool(boolean pKeepActive) protected voidfinalize()intReturns the number of connections in this pool that are available/free for (re-)use.intReturns the number of all connections in this pool.intReturns poolSizebooleanremoveConnectionFromPool(HttpClient httpClient) Removes a connection completly from the pool.retrieveAvailableConnectionFromPool(URI pUri, AuthorizationHandler pHandler) Returns the available connections of this pool for a given URIinvalid input: '&AuthorizationHandler'booleanreturnAvailableConnectionToPool(HttpClient httpClient) Add the connection to the pool.voidsetSessionProperties(SessionProperties pSessionProperties)
-
Constructor Details
-
HttpClientPool
public HttpClientPool()
-
-
Method Details
-
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
-
setSessionProperties
-
retrieveAvailableConnectionFromPool
Returns the available connections of this pool for a given URIinvalid input: '&AuthorizationHandler'- Parameters:
pUri- The uripHandler- The authoriaztion handler- Returns:
- A connection if one is available,
nullotherwise
-
returnAvailableConnectionToPool
Add the connection to the pool. Connection is added as available connection. Use methodaddConnectionToPool(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
-
removeConnectionFromPool
Removes a connection completly from the pool. The connection is not closed by this method, that has to be done by the caller.- Parameters:
httpClient- connection that is to be removed from the pool- Returns:
- true if connection was removed otherwise false
-
closePool
public void closePool(boolean pKeepActive) -
finalize
-
getPoolSize
public int getPoolSize()Returns poolSize- Returns:
- The value of poolSize.
-