Class HttpStreamManager

java.lang.Object
software.amazon.awssdk.crt.http.HttpStreamManager
All Implemented Interfaces:
AutoCloseable

public class HttpStreamManager extends Object implements AutoCloseable
Manages a Pool of HTTP Streams. Wraps either Http1StreamManager or Http2StreamManager depending on the expected protocol configured via HttpStreamManagerOptions.
  • Method Details

    • create

      public static HttpStreamManager create(HttpStreamManagerOptions options)
      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

      public CompletableFuture<Void> getShutdownCompleteFuture()
    • getManagerMetrics

      public HttpManagerMetrics 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:
      close in interface AutoCloseable