Package org.eclipse.jetty.http2.parser
Class GoAwayBodyParser
- java.lang.Object
-
- org.eclipse.jetty.http2.parser.BodyParser
-
- org.eclipse.jetty.http2.parser.GoAwayBodyParser
-
public class GoAwayBodyParser extends BodyParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
GoAwayBodyParser.State
-
Field Summary
Fields Modifier and Type Field Description private int
cursor
private int
error
private int
lastStreamId
private int
length
private byte[]
payload
private GoAwayBodyParser.State
state
-
Fields inherited from class org.eclipse.jetty.http2.parser.BodyParser
LOG
-
-
Constructor Summary
Constructors Constructor Description GoAwayBodyParser(HeaderParser headerParser, Parser.Listener listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
onGoAway(int lastStreamId, int error, byte[] payload)
boolean
parse(java.nio.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.private void
reset()
-
Methods inherited from class org.eclipse.jetty.http2.parser.BodyParser
connectionFailure, emptyBody, getBodyLength, getFrameType, getStreamId, hasFlag, isEndStream, isPadding, notifyData, notifyGoAway, notifyHeaders, notifyPing, notifyPriority, notifyPushPromise, notifyReset, notifySettings, notifyWindowUpdate, rateControlOnEvent, streamFailure
-
-
-
-
Field Detail
-
state
private GoAwayBodyParser.State state
-
cursor
private int cursor
-
length
private int length
-
lastStreamId
private int lastStreamId
-
error
private int error
-
payload
private byte[] payload
-
-
Constructor Detail
-
GoAwayBodyParser
public GoAwayBodyParser(HeaderParser headerParser, Parser.Listener listener)
-
-
Method Detail
-
reset
private void reset()
-
parse
public boolean parse(java.nio.ByteBuffer buffer)
Description copied from class:BodyParser
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.- Specified by:
parse
in classBodyParser
- 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
-
onGoAway
private boolean onGoAway(int lastStreamId, int error, byte[] payload)
-
-