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.
HttpClient#send(HttpRequest, BodyHandler), HttpClient#sendAsync(HttpRequest, BodyHandler), HttpClient#sendAsync(HttpRequest, BodyHandler, PushPromiseHandler)
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final HttpClient. | version
The version of the HTTP protocol on which the stream limit exception occurred. |
| Access | Constructor and Description |
|---|---|
| public | StreamLimitException(final HttpClient.
the version of the protocol on which the stream limit exception
occurred. Must not be null. version,the detailed exception message, which can be null. message)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| private void | readObject(ObjectInputStream
the input stream in)Hides java. Restores the state of a |
| public final HttpClient. | Returns: the protocol version for which the exception was raisedReturns the protocol version for which the exception was raised. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| version | back to summary |
|---|---|
| private final HttpClient. The version of the HTTP protocol on which the stream limit exception occurred. Must not be null. | |
| StreamLimitException | back to summary |
|---|---|
| public StreamLimitException(final HttpClient. Creates a new
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException Hides java. Restores the state of a
| |
| version | back to summary |
|---|---|
| public final HttpClient. Returns the protocol version for which the exception was raised.
| |