Package org.eclipse.jetty.http2.parser
Class BodyParser
java.lang.Object
org.eclipse.jetty.http2.parser.BodyParser
- Direct Known Subclasses:
ContinuationBodyParser
,DataBodyParser
,GoAwayBodyParser
,HeadersBodyParser
,PingBodyParser
,PriorityBodyParser
,PushPromiseBodyParser
,ResetBodyParser
,SettingsBodyParser
,UnknownBodyParser
,WindowUpdateBodyParser
The base parser for the frame body of HTTP/2 frames.
Subclasses implement parse(ByteBuffer)
to parse
the frame specific body.
- See Also:
-
Constructor Summary
ModifierConstructorDescriptionprotected
BodyParser
(HeaderParser headerParser, Parser.Listener listener) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
connectionFailure
(ByteBuffer buffer, int error, String reason) protected void
emptyBody
(ByteBuffer buffer) protected int
protected int
protected int
protected boolean
hasFlag
(int bit) protected boolean
protected boolean
protected void
notifyData
(DataFrame frame) protected void
notifyGoAway
(GoAwayFrame frame) protected void
notifyHeaders
(HeadersFrame frame) protected void
notifyPing
(PingFrame frame) protected void
notifyPriority
(PriorityFrame frame) protected void
protected void
notifyReset
(ResetFrame frame) protected void
notifySettings
(SettingsFrame frame) protected void
abstract boolean
parse
(ByteBuffer buffer) Parses the body bytes in the givenbuffer
; only the body bytes are consumed, therefore when this method returns, the buffer may contain unconsumed bytes.protected boolean
protected boolean
streamFailure
(int streamId, int error, String reason)
-
Constructor Details
-
BodyParser
-
-
Method Details
-
parse
Parses the body bytes in the given
buffer
; only the body 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 body bytes were parsed, false if not enough body bytes were present in the buffer
-
emptyBody
-
hasFlag
protected boolean hasFlag(int bit) -
isPadding
protected boolean isPadding() -
isEndStream
protected boolean isEndStream() -
getStreamId
protected int getStreamId() -
getBodyLength
protected int getBodyLength() -
getFrameType
protected int getFrameType() -
notifyData
-
notifyHeaders
-
notifyPriority
-
notifyReset
-
notifySettings
-
notifyPushPromise
-
notifyPing
-
notifyGoAway
-
notifyWindowUpdate
-
connectionFailure
-
streamFailure
-
rateControlOnEvent
-