org.apache.hc.core5.http2.impl.nio

## Class ClientH2UpgradeHandler

- java.lang.Object
- - org.apache.hc.core5.http2.impl.nio.ClientH2UpgradeHandler

- All Implemented Interfaces:
    ProtocolUpgradeHandler

      @Contract(threading=IMMUTABLE_CONDITIONAL)
       @Internal
      public class ClientH2UpgradeHandler
      extends Object
      implements ProtocolUpgradeHandler

  Protocol upgrade handler that upgrades the underlying `ProtocolIOSession` to HTTP/2 in case of a successful protocol negotiation.
  Since:
    5.2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ClientH2UpgradeHandler(ClientH2StreamMultiplexerFactory http2StreamHandlerFactory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `upgrade(ProtocolIOSession ioSession, FutureCallback<ProtocolIOSession> callback)` Upgrades application protocol of the given I/O session.

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

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

- - ### Constructor Detail

    - #### ClientH2UpgradeHandler

          public ClientH2UpgradeHandler(ClientH2StreamMultiplexerFactory http2StreamHandlerFactory)

  - ### Method Detail

    - #### upgrade

          public void upgrade(ProtocolIOSession ioSession,
                              FutureCallback<ProtocolIOSession> callback)

      Description copied from interface: `ProtocolUpgradeHandler`
      Upgrades application protocol of the given I/O session.
      Specified by:
        `upgrade` in interface `ProtocolUpgradeHandler`

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