Package org.eclipse.jetty.http2.parser
Class HeaderParser
- java.lang.Object
-
- org.eclipse.jetty.http2.parser.HeaderParser
-
public class HeaderParser extends java.lang.ObjectThe parser for the frame header of HTTP/2 frames.
- See Also:
Parser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classHeaderParser.State
-
Field Summary
Fields Modifier and Type Field Description private intcursorprivate intflagsprivate intlengthprivate RateControlrateControlprivate HeaderParser.Statestateprivate intstreamIdprivate inttype
-
Constructor Summary
Constructors Constructor Description HeaderParser(RateControl rateControl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetFrameType()intgetLength()RateControlgetRateControl()intgetStreamId()booleanhasFlag(int bit)booleanparse(java.nio.ByteBuffer buffer)Parses the header bytes in the givenbuffer; only the header bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes.(package private) booleanrateControlOnEvent(java.lang.Object o)protected voidreset()java.lang.StringtoString()
-
-
-
Field Detail
-
rateControl
private final RateControl rateControl
-
state
private HeaderParser.State state
-
cursor
private int cursor
-
length
private int length
-
type
private int type
-
flags
private int flags
-
streamId
private int streamId
-
-
Constructor Detail
-
HeaderParser
public HeaderParser(RateControl rateControl)
-
-
Method Detail
-
getRateControl
public RateControl getRateControl()
-
rateControlOnEvent
boolean rateControlOnEvent(java.lang.Object o)
-
reset
protected void reset()
-
parse
public boolean parse(java.nio.ByteBuffer buffer)
Parses the header bytes in the given
buffer; only the header bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes.- Parameters:
buffer- the buffer to parse- Returns:
- true if the whole header bytes were parsed, false if not enough header bytes were present in the buffer
-
getLength
public int getLength()
-
getFrameType
public int getFrameType()
-
hasFlag
public boolean hasFlag(int bit)
-
getStreamId
public int getStreamId()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-