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

public Class ServerParser

extends Parser
Class Inheritance
Imports
java.nio.ByteBuffer, org.eclipse.jetty.http2.ErrorCode, .Flags, .RateControl, org.eclipse.jetty.http2.frames.FrameType, org.eclipse.jetty.io.ByteBufferPool, org.eclipse.jetty.util.BufferUtil, org.slf4j.Logger, .LoggerFactory

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
private static enum

Field Summary

Modifier and TypeField and Description
private static final Logger
private boolean
private PrefaceParser
private ServerParser.State

Constructor Summary

AccessConstructor and Description
public
ServerParser(ByteBufferPool bufferPool, int maxHeaderSize, RateControl rateControl)

Method Summary

Modifier and TypeMethod and Description
public void
directUpgrade()

A direct upgrade is an unofficial upgrade from HTTP/1.1 to HTTP/2.0.

protected ServerParser.Listener
public void
private void
protected void
public void
parse(ByteBuffer
the buffer to parse
buffer
)

Overrides org.eclipse.jetty.http2.parser.Parser.parse.

Parses the given buffer bytes and emit events to a Listener.

public void
standardUpgrade()

The standard HTTP/1.1 upgrade path.

Inherited from org.eclipse.jetty.http2.parser.Parser:
getBeginNanoTimegetFrameTypegetHpackDecodergetMaxFrameSizegetMaxSettingsKeyshasFlagnotifyConnectionFailureparseBodyparseHeadersetMaxFrameSizesetMaxSettingsKeys

Field Detail

LOGback to summary
private static final Logger LOG

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

notifyPrefaceback to summary
private boolean notifyPreface
prefaceParserback to summary
private PrefaceParser prefaceParser
stateback to summary
private ServerParser.State state

Hides org.eclipse.jetty.http2.parser.Parser.state.

Constructor Detail

ServerParserback to summary
public ServerParser(ByteBufferPool bufferPool, int maxHeaderSize, RateControl rateControl)

Method Detail

directUpgradeback to summary
public void directUpgrade()

A direct upgrade is an unofficial upgrade from HTTP/1.1 to HTTP/2.0.

A direct upgrade is initiated when org.eclipse.jetty.server.HttpConnection sees a request with these bytes:

PRI * HTTP/2.0\r\n
\r\n

This request is part of the HTTP/2.0 preface, indicating that a HTTP/2.0 client is attempting a h2c direct connection.

This is not a standard HTTP/1.1 Upgrade path.

getListenerback to summary
protected ServerParser.Listener getListener()

Overrides org.eclipse.jetty.http2.parser.Parser.getListener.

Annotations
@Override
initback to summary
public void init(Parser.Listener listener)

Overrides org.eclipse.jetty.http2.parser.Parser.init.

Annotations
@Override
notifyPrefaceback to summary
private void notifyPreface()
onPrefaceback to summary
protected void onPreface()
parseback to summary
public void parse(ByteBuffer buffer)

Overrides org.eclipse.jetty.http2.parser.Parser.parse.

Doc from org.eclipse.jetty.http2.parser.Parser.parse.

Parses the given buffer bytes and emit events to a Listener.

When this method returns, the buffer may not be fully consumed, so invocations to this method should be wrapped in a loop:

while (buffer.hasRemaining())
    parser.parse(buffer);
Parameters
buffer:ByteBuffer

the buffer to parse

Annotations
@Override
standardUpgradeback to summary
public void standardUpgrade()

The standard HTTP/1.1 upgrade path.

org.eclipse.jetty.http2.parser back to summary

public Interface ServerParser.Listener

extends Listener
Known Direct Implementers
org.eclipse.jetty.http2.parser.ServerParser.Listener.Wrapper

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Method Summary

Modifier and TypeMethod and Description
public default void
Inherited from org.eclipse.jetty.http2.parser.Parser.Listener:
onConnectionFailureonDataonGoAwayonHeadersonPingonPriorityonPushPromiseonResetonSettingsonStreamFailureonWindowUpdate

Method Detail

onPrefaceback to summary
public default void onPreface()
org.eclipse.jetty.http2.parser back to summary

public Class ServerParser.Listener.Wrapper

extends Wrapper
implements Listener
Class Inheritance
All Implemented Interfaces
org.eclipse.jetty.http2.parser.ServerParser.Listener, org.eclipse.jetty.http2.parser.Parser.Listener

Constructor Summary

AccessConstructor and Description
public

Constructor Detail

Wrapperback to summary
public Wrapper(ServerParser.Listener listener)

Method Detail

getParserListenerback to summary
public ServerParser.Listener getParserListener()

Overrides org.eclipse.jetty.http2.parser.Parser.Listener.Wrapper.getParserListener.

Annotations
@Override
onPrefaceback to summary
public void onPreface()

Overrides default org.eclipse.jetty.http2.parser.ServerParser.Listener.onPreface.

Annotations
@Override
org.eclipse.jetty.http2.parser back to summary

private final Enum ServerParser.State

extends Enum<ServerParser.State>
Class Inheritance

Field Summary

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

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

Field Detail

FRAMESback to summary
public static final ServerParser.State FRAMES
PREFACEback to summary
public static final ServerParser.State PREFACE
SETTINGSback to summary
public static final ServerParser.State SETTINGS

Constructor Detail

Stateback to summary
private State()

Method Detail

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