Package org.apache.hc.client5.http.impl
Class ProtocolSwitchStrategy
- java.lang.Object
-
- org.apache.hc.client5.http.impl.ProtocolSwitchStrategy
-
@Internal public final class ProtocolSwitchStrategy extends java.lang.ObjectProtocol switch handler.- Since:
- 5.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static interfaceProtocolSwitchStrategy.HeaderConsumer
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.hc.core5.util.Tokenizer.DelimiterLAX_PROTO_DELIMITERprivate static org.apache.hc.core5.http.ProtocolVersionParserPROTOCOL_VERSION_PARSERprivate static org.apache.hc.core5.util.TokenizerTOKENIZERprivate static org.apache.hc.core5.util.Tokenizer.DelimiterUPGRADE_TOKEN_DELIMITER
-
Constructor Summary
Constructors Constructor Description ProtocolSwitchStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidparseHeader(org.apache.hc.core5.http.Header header, ProtocolSwitchStrategy.HeaderConsumer consumer)private voidparseHeaderElements(java.lang.CharSequence buffer, org.apache.hc.core5.http.message.ParserCursor cursor, ProtocolSwitchStrategy.HeaderConsumer consumer)private voidparseHeaders(org.apache.hc.core5.http.HttpMessage message, java.lang.String name, ProtocolSwitchStrategy.HeaderConsumer consumer)private org.apache.hc.core5.http.ProtocolVersionparseProtocolVersion(java.lang.CharSequence buffer, org.apache.hc.core5.http.message.ParserCursor cursor)org.apache.hc.core5.http.ProtocolVersionswitchProtocol(org.apache.hc.core5.http.HttpMessage response)
-
-
-
Field Detail
-
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
-
-
Method Detail
-
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(java.lang.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, java.lang.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(java.lang.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
-
-