Package io.netty.handler.codec.haproxy
Class HAProxyMessageDecoder.LineHeaderExtractor
- java.lang.Object
-
- io.netty.handler.codec.haproxy.HAProxyMessageDecoder.HeaderExtractor
-
- io.netty.handler.codec.haproxy.HAProxyMessageDecoder.LineHeaderExtractor
-
- Enclosing class:
- HAProxyMessageDecoder
private final class HAProxyMessageDecoder.LineHeaderExtractor extends HAProxyMessageDecoder.HeaderExtractor
-
-
Constructor Summary
Constructors Constructor Description LineHeaderExtractor(int maxHeaderSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdelimiterLength(ByteBuf buffer, int eoh)Get the length of the header delimiter.protected intfindEndOfHeader(ByteBuf buffer)Find the end of the header from the givenByteBuf,the end may be a CRLF, or the length given by the header.-
Methods inherited from class io.netty.handler.codec.haproxy.HAProxyMessageDecoder.HeaderExtractor
extract
-
-
-
-
Method Detail
-
findEndOfHeader
protected int findEndOfHeader(ByteBuf buffer)
Description copied from class:HAProxyMessageDecoder.HeaderExtractorFind the end of the header from the givenByteBuf,the end may be a CRLF, or the length given by the header.- Specified by:
findEndOfHeaderin classHAProxyMessageDecoder.HeaderExtractor- Parameters:
buffer- the buffer to be searched- Returns:
-1if can not find the end, otherwise return the buffer index of end
-
delimiterLength
protected int delimiterLength(ByteBuf buffer, int eoh)
Description copied from class:HAProxyMessageDecoder.HeaderExtractorGet the length of the header delimiter.- Specified by:
delimiterLengthin classHAProxyMessageDecoder.HeaderExtractor- Parameters:
buffer- the buffer where delimiter is locatedeoh- index of delimiter- Returns:
- length of the delimiter
-
-