org.apache.hc.core5.http2.nio.pool

## Class H2ConnPool

- java.lang.Object
- - org.apache.hc.core5.reactor.AbstractIOSessionPool<HttpHost>
  - - org.apache.hc.core5.http2.nio.pool.H2ConnPool

- All Implemented Interfaces:
    Closeable, AutoCloseable, ModalCloseable

      @Contract(threading=SAFE)
      public final class H2ConnPool
      extends AbstractIOSessionPool<HttpHost>

  Pool of HTTP/2 message multiplexing capable connections.
  Since:
    5.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `H2ConnPool(ConnectionInitiator connectionInitiator, Resolver<HttpHost,InetSocketAddress> addressResolver, TlsStrategy tlsStrategy)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `closeSession(IOSession ioSession, CloseMode closeMode)`
    `protected Future<IOSession>` | `connectSession(HttpHost namedEndpoint, Timeout connectTimeout, FutureCallback<IOSession> callback)`
    `TimeValue` | `getValidateAfterInactivity()`
    `void` | `setValidateAfterInactivity(TimeValue timeValue)`
    `protected void` | `validateSession(IOSession ioSession, Callback<Boolean> callback)`

    - ### Methods inherited from class org.apache.hc.core5.reactor.AbstractIOSessionPool

      `close, close, closeIdle, enumAvailable, getRoutes, getSession, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### H2ConnPool

          public H2ConnPool(ConnectionInitiator connectionInitiator,
                            Resolver<HttpHost,InetSocketAddress> addressResolver,
                            TlsStrategy tlsStrategy)

  - ### Method Detail

    - #### getValidateAfterInactivity

          public TimeValue getValidateAfterInactivity()

    - #### setValidateAfterInactivity

          public void setValidateAfterInactivity(TimeValue timeValue)

    - #### closeSession

          protected void closeSession(IOSession ioSession,
                                      CloseMode closeMode)

      Specified by:
        `closeSession` in class `AbstractIOSessionPool<HttpHost>`

    - #### connectSession

          protected Future<IOSession> connectSession(HttpHost namedEndpoint,
                                                     Timeout connectTimeout,
                                                     FutureCallback<IOSession> callback)

      Specified by:
        `connectSession` in class `AbstractIOSessionPool<HttpHost>`

    - #### validateSession

          protected void validateSession(IOSession ioSession,
                                         Callback<Boolean> callback)

      Specified by:
        `validateSession` in class `AbstractIOSessionPool<HttpHost>`

Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.