Interface HttpClientUpgradeHandler.UpgradeCodec

    • Method Detail

      • protocol

        CharSequence protocol()
        Returns the name of the protocol supported by this codec, as indicated by the 'UPGRADE' header.
      • setUpgradeHeaders

        Collection<CharSequence> setUpgradeHeaders​(ChannelHandlerContext ctx,
                                                   HttpRequest upgradeRequest)
        Sets any protocol-specific headers required to the upgrade request. Returns the names of all headers that were added. These headers will be used to populate the CONNECTION header.
      • upgradeTo

        void upgradeTo​(ChannelHandlerContext ctx,
                       Send<FullHttpResponse> upgradeResponse)
                throws Exception
        Performs an HTTP protocol upgrade from the source codec. This method is responsible for adding all handlers required for the new protocol.
        Parameters:
        ctx - the context for the current handler.
        upgradeResponse - the 101 Switching Protocols response that indicates that the server has switched to this protocol.
        Throws:
        Exception