Class ProtocolSwitchStrategy

java.lang.Object
org.apache.hc.client5.http.impl.ProtocolSwitchStrategy

@Internal public final class ProtocolSwitchStrategy extends Object
Protocol switch handler.
Since:
5.4
  • Field Details

    • PROTOCOL_VERSION_PARSER

      private static final org.apache.hc.core5.http.ProtocolVersionParser PROTOCOL_VERSION_PARSER
    • TOKENIZER

      private static final org.apache.hc.core5.util.Tokenizer TOKENIZER
    • UPGRADE_TOKEN_DELIMITER

      private static final org.apache.hc.core5.util.Tokenizer.Delimiter UPGRADE_TOKEN_DELIMITER
    • LAX_PROTO_DELIMITER

      private static final org.apache.hc.core5.util.Tokenizer.Delimiter LAX_PROTO_DELIMITER
  • Constructor Details

    • ProtocolSwitchStrategy

      public ProtocolSwitchStrategy()
  • Method Details

    • switchProtocol

      public org.apache.hc.core5.http.ProtocolVersion switchProtocol(org.apache.hc.core5.http.HttpMessage response) throws org.apache.hc.core5.http.ProtocolException
      Throws:
      org.apache.hc.core5.http.ProtocolException
    • parseProtocolVersion

      private org.apache.hc.core5.http.ProtocolVersion parseProtocolVersion(CharSequence buffer, org.apache.hc.core5.http.message.ParserCursor cursor) throws org.apache.hc.core5.http.ProtocolException
      Throws:
      org.apache.hc.core5.http.ProtocolException
    • parseHeaders

      private void parseHeaders(org.apache.hc.core5.http.HttpMessage message, String name, ProtocolSwitchStrategy.HeaderConsumer consumer) throws org.apache.hc.core5.http.ProtocolException
      Throws:
      org.apache.hc.core5.http.ProtocolException
    • parseHeader

      private void parseHeader(org.apache.hc.core5.http.Header header, ProtocolSwitchStrategy.HeaderConsumer consumer) throws org.apache.hc.core5.http.ProtocolException
      Throws:
      org.apache.hc.core5.http.ProtocolException
    • parseHeaderElements

      private void parseHeaderElements(CharSequence buffer, org.apache.hc.core5.http.message.ParserCursor cursor, ProtocolSwitchStrategy.HeaderConsumer consumer) throws org.apache.hc.core5.http.ProtocolException
      Throws:
      org.apache.hc.core5.http.ProtocolException