Class StreamLimitException

All Implemented Interfaces:
Serializable

public final class StreamLimitException extends IOException
An exception raised when the limit imposed for stream creation on an HTTP connection is reached, and the client is unable to create a new stream.

A StreamLimitException may be raised when attempting to send a new request on any protocol version that supports multiplexing on a single connection. Both HTTP/2 and HTTP/3 allow multiplexing concurrent requests to the same server on a single connection. Each request/response exchange is carried over a single stream, as defined by the corresponding protocol.

Whether and when a StreamLimitException may be relayed to the code initiating a request/response exchange is implementation and protocol version dependent.

Since:
26
See Also:
  • Constructor Details

    • StreamLimitException

      public StreamLimitException(HttpClient.Version version, String message)
      Creates a new StreamLimitException
      Parameters:
      version - the version of the protocol on which the stream limit exception occurred. Must not be null.
      message - the detailed exception message, which can be null.
  • Method Details

    • version

      public final HttpClient.Version version()
      Returns the protocol version for which the exception was raised.
      Returns:
      the protocol version for which the exception was raised