Package software.amazon.awssdk.crt.http
Class HttpClientConnectionManager
java.lang.Object
software.amazon.awssdk.crt.CrtResource
software.amazon.awssdk.crt.http.HttpClientConnectionManager
- All Implemented Interfaces:
AutoCloseable
Manages a Pool of Http Connections
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.awssdk.crt.CrtResource
CrtResource.ResourceInstance
-
Method Summary
Modifier and TypeMethodDescriptionRequest a HttpClientConnection from the Connection Pool.static HttpClientConnectionManager
create
(HttpClientConnectionManagerOptions options) Factory function for HttpClientConnectionManager instancesint
getUri()
long
void
Releases this HttpClientConnection back into the Connection Pool, and allows another Request to acquire this connection.Methods inherited from class software.amazon.awssdk.crt.CrtResource
addRef, addReferenceTo, close, collectNativeResource, collectNativeResources, decRef, getNativeHandle, getResourceLogDescription, isNull, logNativeResources, logNativeResources, removeReferenceTo, setDescription, waitForNoResources
-
Method Details
-
create
Factory function for HttpClientConnectionManager instances- Parameters:
options
- configuration options- Returns:
- a new instance of an HttpClientConnectionManager
-
acquireConnection
Request a HttpClientConnection from the Connection Pool.- Returns:
- A Future for a HttpClientConnection that will be completed when a connection is acquired.
-
releaseConnection
Releases this HttpClientConnection back into the Connection Pool, and allows another Request to acquire this connection.- Parameters:
conn
- Connection to release
-
getShutdownCompleteFuture
-
getMaxConnections
public int getMaxConnections()- Returns:
- maximum number of connections this connection manager will pool
-
getManagerMetrics
- Returns:
- concurrency metrics for the current manager
-
getWindowSize
public long getWindowSize()- Returns:
- size of the per-connection streaming read window for response handling
-
getUri
- Returns:
- uri the connection manager is making connections to
-