Package org.eclipse.jetty.http2.parser
Class ServerParser
- java.lang.Object
-
- org.eclipse.jetty.http2.parser.Parser
-
- org.eclipse.jetty.http2.parser.ServerParser
-
public class ServerParser extends Parser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ServerParser.Listener
private static class
ServerParser.State
-
Field Summary
Fields Modifier and Type Field Description private static org.eclipse.jetty.util.log.Logger
LOG
private boolean
notifyPreface
private PrefaceParser
prefaceParser
private ServerParser.State
state
-
Constructor Summary
Constructors Constructor Description ServerParser(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, int maxHeaderSize)
ServerParser(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, int maxHeaderSize, RateControl rateControl)
ServerParser(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, ServerParser.Listener listener, int maxDynamicTableSize, int maxHeaderSize, RateControl rateControl)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
directUpgrade()
A direct upgrade is an unofficial upgrade from HTTP/1.1 to HTTP/2.0.void
init(Parser.Listener listener)
private void
notifyPreface()
protected void
onPreface()
void
parse(java.nio.ByteBuffer buffer)
Parses the givenbuffer
bytes and emit events to aParser.Listener
.void
standardUpgrade()
The standard HTTP/1.1 upgrade path.-
Methods inherited from class org.eclipse.jetty.http2.parser.Parser
getFrameType, getHpackDecoder, getListener, getMaxFrameLength, getMaxFrameSize, getMaxSettingsKeys, hasFlag, init, notifyConnectionFailure, parseBody, parseHeader, setMaxFrameLength, setMaxFrameSize, setMaxSettingsKeys
-
-
-
-
Field Detail
-
LOG
private static final org.eclipse.jetty.util.log.Logger LOG
-
prefaceParser
private PrefaceParser prefaceParser
-
state
private ServerParser.State state
-
notifyPreface
private boolean notifyPreface
-
-
Constructor Detail
-
ServerParser
@Deprecated public ServerParser(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, ServerParser.Listener listener, int maxDynamicTableSize, int maxHeaderSize, RateControl rateControl)
Deprecated.
-
ServerParser
public ServerParser(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, int maxHeaderSize)
-
ServerParser
public ServerParser(org.eclipse.jetty.io.ByteBufferPool byteBufferPool, int maxHeaderSize, RateControl rateControl)
-
-
Method Detail
-
init
public void init(Parser.Listener listener)
-
directUpgrade
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.
-
standardUpgrade
public void standardUpgrade()
The standard HTTP/1.1 upgrade path.
-
parse
public void parse(java.nio.ByteBuffer buffer)
Description copied from class:Parser
Parses the given
buffer
bytes and emit events to aParser.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);
-
onPreface
protected void onPreface()
-
notifyPreface
private void notifyPreface()
-
-