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
public class HttpClientConnectionManager extends CrtResource
Manages a Pool of Http Connections
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.awssdk.crt.CrtResource
CrtResource.ResourceInstance
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<HttpClientConnection>
acquireConnection()
Request a HttpClientConnection from the Connection Pool.static HttpClientConnectionManager
create(HttpClientConnectionManagerOptions options)
Factory function for HttpClientConnectionManager instancesHttpManagerMetrics
getManagerMetrics()
int
getMaxConnections()
CompletableFuture<Void>
getShutdownCompleteFuture()
URI
getUri()
long
getWindowSize()
void
releaseConnection(HttpClientConnection conn)
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 Detail
-
create
public static HttpClientConnectionManager create(HttpClientConnectionManagerOptions options)
Factory function for HttpClientConnectionManager instances- Parameters:
options
- configuration options- Returns:
- a new instance of an HttpClientConnectionManager
-
acquireConnection
public CompletableFuture<HttpClientConnection> acquireConnection()
Request a HttpClientConnection from the Connection Pool.- Returns:
- A Future for a HttpClientConnection that will be completed when a connection is acquired.
-
releaseConnection
public void releaseConnection(HttpClientConnection conn)
Releases this HttpClientConnection back into the Connection Pool, and allows another Request to acquire this connection.- Parameters:
conn
- Connection to release
-
getShutdownCompleteFuture
public CompletableFuture<Void> getShutdownCompleteFuture()
-
getMaxConnections
public int getMaxConnections()
- Returns:
- maximum number of connections this connection manager will pool
-
getManagerMetrics
public HttpManagerMetrics 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
public URI getUri()
- Returns:
- uri the connection manager is making connections to
-
-