Top Inners Fields Constructors Methods
org.eclipse.jetty.http2.parser

public Class SettingsBodyParser

extends BodyParser
Class Inheritance
Imports
java.nio.ByteBuffer, java.util.Collections, .HashMap, .Map, java.util.concurrent.atomic.AtomicReference, org.eclipse.jetty.http2.ErrorCode, .Flags, .RateControl, org.eclipse.jetty.http2.frames.Frame, .SettingsFrame, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static enum

Field Summary

Modifier and TypeField and Description
private int
private int
private int
private static final Logger
private final int
private int
private Map<Integer, Integer>
private int
private SettingsBodyParser.State

Constructor Summary

AccessConstructor and Description
public
public
SettingsBodyParser(HeaderParser headerParser, Parser.Listener listener, int maxKeys)

Method Summary

Modifier and TypeMethod and Description
protected void
public int
protected boolean
onSetting(ByteBuffer buffer, Map<Integer, Integer> settings, int key, int value)

protected boolean
onSettings(ByteBuffer buffer, Map<Integer, Integer> settings)

private boolean
public boolean
parse(ByteBuffer
the buffer to parse
buffer
)

Implements abstract org.eclipse.jetty.http2.parser.BodyParser.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.

private boolean
parse(ByteBuffer buffer, int streamId, int bodyLength)

public static SettingsFrame

Returns:

the SETTINGS frame from the parsed body bytes
parseBody
(final ByteBuffer
the buffer containing the body of SETTINGS frame
buffer
)

Parses the given buffer containing the whole body of a SETTINGS frame (without header bytes), typically from the HTTP2-Settings header.

protected void
private boolean
validateFrame(ByteBuffer buffer, int streamId, int bodyLength)

Inherited from org.eclipse.jetty.http2.parser.BodyParser:
connectionFailuregetBodyLengthgetFrameTypegetStreamIdhasFlagisEndStreamisPaddingnotifyDatanotifyGoAwaynotifyHeadersnotifyPingnotifyPrioritynotifyPushPromisenotifyResetnotifySettingsnotifyWindowUpdaterateControlOnEventstreamFailure

Field Detail

cursorback to summary
private int cursor
keysback to summary
private int keys
lengthback to summary
private int length
LOGback to summary
private static final Logger LOG

Hides org.eclipse.jetty.http2.parser.BodyParser.LOG.

maxKeysback to summary
private final int maxKeys
settingIdback to summary
private int settingId
settingsback to summary
private Map<Integer, Integer> settings
settingValueback to summary
private int settingValue
stateback to summary
private SettingsBodyParser.State state

Constructor Detail

SettingsBodyParserback to summary
public SettingsBodyParser(HeaderParser headerParser, Parser.Listener listener)
SettingsBodyParserback to summary
public SettingsBodyParser(HeaderParser headerParser, Parser.Listener listener, int maxKeys)

Method Detail

emptyBodyback to summary
protected void emptyBody(ByteBuffer buffer)

Overrides org.eclipse.jetty.http2.parser.BodyParser.emptyBody.

Annotations
@Override
getMaxKeysback to summary
public int getMaxKeys()
onSettingback to summary
protected boolean onSetting(ByteBuffer buffer, Map<Integer, Integer> settings, int key, int value)
onSettingsback to summary
protected boolean onSettings(ByteBuffer buffer, Map<Integer, Integer> settings)
onSettingsback to summary
private boolean onSettings(ByteBuffer buffer, SettingsFrame frame)
parseback to summary
public boolean parse(ByteBuffer buffer)

Implements abstract org.eclipse.jetty.http2.parser.BodyParser.parse.

Doc from org.eclipse.jetty.http2.parser.BodyParser.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:ByteBuffer

the buffer to parse

Returns:boolean

true if the whole body bytes were parsed, false if not enough body bytes were present in the buffer

Annotations
@Override
parseback to summary
private boolean parse(ByteBuffer buffer, int streamId, int bodyLength)
parseBodyback to summary
public static SettingsFrame parseBody(final ByteBuffer buffer)

Parses the given buffer containing the whole body of a SETTINGS frame (without header bytes), typically from the HTTP2-Settings header.

Parameters
buffer:ByteBuffer

the buffer containing the body of SETTINGS frame

Returns:SettingsFrame

the SETTINGS frame from the parsed body bytes

resetback to summary
protected void reset()
validateFrameback to summary
private boolean validateFrame(ByteBuffer buffer, int streamId, int bodyLength)
org.eclipse.jetty.http2.parser back to summary

private final Enum SettingsBodyParser.State

extends Enum<SettingsBodyParser.State>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final SettingsBodyParser.State
public static final SettingsBodyParser.State
public static final SettingsBodyParser.State
public static final SettingsBodyParser.State
public static final SettingsBodyParser.State

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SettingsBodyParser.State
public static SettingsBodyParser.State[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

PREPAREback to summary
public static final SettingsBodyParser.State PREPARE
SETTING_IDback to summary
public static final SettingsBodyParser.State SETTING_ID
SETTING_ID_BYTESback to summary
public static final SettingsBodyParser.State SETTING_ID_BYTES
SETTING_VALUEback to summary
public static final SettingsBodyParser.State SETTING_VALUE
SETTING_VALUE_BYTESback to summary
public static final SettingsBodyParser.State SETTING_VALUE_BYTES

Constructor Detail

Stateback to summary
private State()

Method Detail

valueOfback to summary
public static SettingsBodyParser.State valueOf(String name)
valuesback to summary
public static SettingsBodyParser.State[] values()