Package io.netty.handler.codec.haproxy
Class HAProxyMessageDecoder.StructHeaderExtractor
- java.lang.Object
-
- io.netty.handler.codec.haproxy.HAProxyMessageDecoder.HeaderExtractor
-
- io.netty.handler.codec.haproxy.HAProxyMessageDecoder.StructHeaderExtractor
-
- Enclosing class:
- HAProxyMessageDecoder
private final class HAProxyMessageDecoder.StructHeaderExtractor extends HAProxyMessageDecoder.HeaderExtractor
-
-
Constructor Summary
Constructors Constructor Description StructHeaderExtractor(int maxHeaderSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
delimiterLength(ByteBuf buffer, int eoh)
Get the length of the header delimiter.protected int
findEndOfHeader(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.HeaderExtractor
Find the end of the header from the givenByteBuf
,the end may be a CRLF, or the length given by the header.- Specified by:
findEndOfHeader
in classHAProxyMessageDecoder.HeaderExtractor
- Parameters:
buffer
- the buffer to be searched- Returns:
-1
if 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.HeaderExtractor
Get the length of the header delimiter.- Specified by:
delimiterLength
in classHAProxyMessageDecoder.HeaderExtractor
- Parameters:
buffer
- the buffer where delimiter is locatedeoh
- index of delimiter- Returns:
- length of the delimiter
-
-