Package software.amazon.awssdk.crt.http
Class HttpStreamManager
java.lang.Object
software.amazon.awssdk.crt.http.HttpStreamManager
- All Implemented Interfaces:
AutoCloseable
Manages a Pool of HTTP Streams. Wraps either Http1StreamManager or Http2StreamManager
depending on the expected protocol configured via HttpStreamManagerOptions.
-
Method Summary
Modifier and TypeMethodDescriptionacquireStream(HttpRequestBase request, HttpStreamBaseResponseHandler streamHandler) Request an HttpStream from StreamManager.voidclose()static HttpStreamManagercreate(HttpStreamManagerOptions options) Factory function for HttpStreamManager instancesint
-
Method Details
-
create
Factory function for HttpStreamManager instances- Parameters:
options- the stream manager options to configure the manager- Returns:
- a new instance of an HttpStreamManager
-
acquireStream
public CompletableFuture<HttpStreamBase> acquireStream(HttpRequestBase request, HttpStreamBaseResponseHandler streamHandler) Request an HttpStream from StreamManager.- Parameters:
request- HttpRequestBase. The Request to make to the Server.streamHandler- HttpStreamBaseResponseHandler. The Stream Handler to be called from the Native EventLoop- Returns:
- A future for a HttpStreamBase that will be completed when the stream is acquired.
-
getShutdownCompleteFuture
-
getManagerMetrics
- Returns:
- concurrency metrics for the current manager
-
getMaxConnections
public int getMaxConnections()- Returns:
- maximum number of connections this connection manager will pool
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-