| Modifier and Type | Field and Description |
|---|---|
| private final HttpClientImpl | |
| private final ReentrantLock | |
| private final Map | |
| pack-priv static final Logger | |
| private final Set | |
| private static final int | |
| private volatile boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv HttpClientImpl | |
| private boolean | |
| pack-priv SettingsFrame | |
| pack-priv CompletableFuture | |
| pack-priv int | |
| private static int | |
| pack-priv String | getSettingsString(boolean defaultServerPush)
Returns the client settings as a base64 (url) encoded string |
| pack-priv boolean | |
| pack-priv void | removeFromPool(Http2Connection
the connection to remove from the pool c)Removes the connection from the pool (if it was in the pool). |
| pack-priv boolean | Returns: true if pushes are globally disabled on all connectionsThis method is used to test whether pushes are globally disabled on all connections. |
| pack-priv void | |
| public boolean |
| client | back to summary |
|---|---|
| private final HttpClientImpl client | |
| connectionPoolLock | back to summary |
|---|---|
| private final ReentrantLock connectionPoolLock | |
| connections | back to summary |
|---|---|
| private final Map<String, Http2Connection> connections | |
| debug | back to summary |
|---|---|
| pack-priv static final Logger debug | |
| failures | back to summary |
|---|---|
| private final Set<String> failures | |
| K | back to summary |
|---|---|
| private static final int K | |
| stopping | back to summary |
|---|---|
| private volatile boolean stopping | |
| Http2ClientImpl | back to summary |
|---|---|
| pack-priv Http2ClientImpl(HttpClientImpl client) | |
| client | back to summary |
|---|---|
| pack-priv HttpClientImpl client() | |
| close | back to summary |
|---|---|
| private boolean close(Http2Connection h2c) | |
| getClientSettings | back to summary |
|---|---|
| pack-priv SettingsFrame getClientSettings(boolean defaultServerPush) | |
| getConnectionFor | back to summary |
|---|---|
| pack-priv CompletableFuture When HTTP/2 requested only. The following describes the aggregate behavior including the calling code. In all cases, the HTTP/2 connection cache is checked first for a suitable connection and that is returned if available. If not, a new connection is opened, except in https case when a previous negotiate failed. In that case, we want to continue using http/1.1. When a connection is to be opened and if multiple requests are sent in parallel then each will open a new connection. If negotiation/upgrade succeeds then one connection will be put in the cache and the others will be closed after the initial request completes (not strictly necessary for h2, only for h2c) If negotiate/upgrade fails, then any opened connections remain open (as http/1.1) and will be used and cached in the http/1 cache. Note, this method handles the https failure case only (by completing the CF with an ALPN exception, handled externally) The h2c upgrade is handled externally also. Specific CF behavior of this method. 1. completes with ALPN exception: h2 negotiate failed for first time. failure recorded. 2. completes with other exception: failure not recorded. Caller must handle 3. completes normally with null: no connection in cache for h2c or h2 failed previously 4. completes normally with connection: h2 or h2c connection in cache. Use it. | |
| getConnectionWindowSize | back to summary |
|---|---|
| pack-priv int getConnectionWindowSize(SettingsFrame clientSettings) | |
| getParameter | back to summary |
|---|---|
| private static int getParameter(String property, int min, int max, int defaultValue) | |
| getSettingsString | back to summary |
|---|---|
| pack-priv String getSettingsString(boolean defaultServerPush) Returns the client settings as a base64 (url) encoded string | |
| offerConnection | back to summary |
|---|---|
| pack-priv boolean offerConnection(Http2Connection c) | |
| removeFromPool | back to summary |
|---|---|
| pack-priv void removeFromPool(Http2Connection c) Removes the connection from the pool (if it was in the pool). This method doesn't close the connection.
| |
| serverPushDisabled | back to summary |
|---|---|
| pack-priv boolean serverPushDisabled() This method is used to test whether pushes are globally disabled on all connections.
| |
| stop | back to summary |
|---|---|
| pack-priv void stop() | |
| stopping | back to summary |
|---|---|
| public boolean stopping() | |