Package software.amazon.awssdk.crt.http
Class Http2StreamManager
- java.lang.Object
-
- software.amazon.awssdk.crt.CrtResource
-
- software.amazon.awssdk.crt.http.Http2StreamManager
-
- All Implemented Interfaces:
AutoCloseable
public class Http2StreamManager extends CrtResource
Manages a Pool of HTTP/2 Streams. Creates and manages HTTP/2 connections under the hood.
-
-
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<Http2Stream>
acquireStream(Http2Request request, HttpStreamBaseResponseHandler streamHandler)
Request a Http2Stream from StreamManager.CompletableFuture<Http2Stream>
acquireStream(HttpRequest request, HttpStreamBaseResponseHandler streamHandler)
static Http2StreamManager
create(Http2StreamManagerOptions options)
Factory function for Http2StreamManager instancesHttpManagerMetrics
getManagerMetrics()
int
getMaxConnections()
CompletableFuture<Void>
getShutdownCompleteFuture()
-
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 Http2StreamManager create(Http2StreamManagerOptions options)
Factory function for Http2StreamManager instances- Parameters:
options
- configuration options- Returns:
- a new instance of an Http2StreamManager
-
acquireStream
public CompletableFuture<Http2Stream> acquireStream(Http2Request request, HttpStreamBaseResponseHandler streamHandler)
Request a Http2Stream from StreamManager.- Parameters:
request
- The Request to make to the Server.streamHandler
- The Stream Handler to be called from the Native EventLoop- Returns:
- A future for a Http2Stream that will be completed when the stream is acquired.
-
acquireStream
public CompletableFuture<Http2Stream> acquireStream(HttpRequest request, HttpStreamBaseResponseHandler streamHandler)
-
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
-
getShutdownCompleteFuture
public CompletableFuture<Void> getShutdownCompleteFuture()
-
-