public abstract class BodyParser extends Object
The base parser for the frame body of HTTP/2 frames.
Subclasses implement parse(ByteBuffer)
to parse
the frame specific body.
Parser
Modifier | Constructor and Description |
---|---|
protected |
BodyParser(HeaderParser headerParser,
Parser.Listener listener) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
connectionFailure(ByteBuffer buffer,
int error,
String reason) |
protected void |
emptyBody(ByteBuffer buffer) |
protected int |
getBodyLength() |
protected int |
getStreamId() |
protected boolean |
hasFlag(int bit) |
protected boolean |
isEndStream() |
protected boolean |
isPadding() |
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 |
notifyPushPromise(PushPromiseFrame frame) |
protected void |
notifyReset(ResetFrame frame) |
protected void |
notifySettings(SettingsFrame frame) |
protected void |
notifyWindowUpdate(WindowUpdateFrame frame) |
abstract boolean |
parse(ByteBuffer buffer)
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. |
protected static final Logger LOG
protected BodyParser(HeaderParser headerParser, Parser.Listener listener)
public abstract boolean parse(ByteBuffer buffer)
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.
buffer
- the buffer to parseprotected void emptyBody(ByteBuffer buffer)
protected boolean hasFlag(int bit)
protected boolean isPadding()
protected boolean isEndStream()
protected int getStreamId()
protected int getBodyLength()
protected void notifyData(DataFrame frame)
protected void notifyHeaders(HeadersFrame frame)
protected void notifyPriority(PriorityFrame frame)
protected void notifyReset(ResetFrame frame)
protected void notifySettings(SettingsFrame frame)
protected void notifyPushPromise(PushPromiseFrame frame)
protected void notifyPing(PingFrame frame)
protected void notifyGoAway(GoAwayFrame frame)
protected void notifyWindowUpdate(WindowUpdateFrame frame)
protected boolean connectionFailure(ByteBuffer buffer, int error, String reason)
Copyright © 1995-2015 Webtide. All Rights Reserved.