Class ProtocolSwitchStrategy
java.lang.Object
org.apache.hc.client5.http.impl.ProtocolSwitchStrategy
Protocol switch handler.
- Since:
- 5.4
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.hc.core5.util.Tokenizer.Delimiterprivate static final org.apache.hc.core5.http.ProtocolVersionParserprivate static final org.apache.hc.core5.util.Tokenizerprivate static final org.apache.hc.core5.util.Tokenizer.Delimiter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidparseHeader(org.apache.hc.core5.http.Header header, ProtocolSwitchStrategy.HeaderConsumer consumer) private voidparseHeaderElements(CharSequence buffer, org.apache.hc.core5.http.message.ParserCursor cursor, ProtocolSwitchStrategy.HeaderConsumer consumer) private voidparseHeaders(org.apache.hc.core5.http.HttpMessage message, String name, ProtocolSwitchStrategy.HeaderConsumer consumer) private org.apache.hc.core5.http.ProtocolVersionparseProtocolVersion(CharSequence buffer, org.apache.hc.core5.http.message.ParserCursor cursor) org.apache.hc.core5.http.ProtocolVersionswitchProtocol(org.apache.hc.core5.http.HttpMessage response)
-
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
-