Package org.eclipse.jetty.http2.server
Class HTTP2ServerConnection
java.lang.Object
org.eclipse.jetty.io.AbstractConnection
org.eclipse.jetty.http2.HTTP2Connection
org.eclipse.jetty.http2.server.HTTP2ServerConnection
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Parser.Listener
,ServerParser.Listener
,Connection
,Connection.UpgradeTo
,WriteFlusher.Listener
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected class
Nested classes/interfaces inherited from class org.eclipse.jetty.http2.HTTP2Connection
HTTP2Connection.HTTP2Producer
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.Connection
Connection.Listener, Connection.UpgradeFrom, Connection.UpgradeTo
Nested classes/interfaces inherited from interface org.eclipse.jetty.http2.parser.Parser.Listener
Parser.Listener.Adapter, Parser.Listener.Wrapper
Nested classes/interfaces inherited from interface org.eclipse.jetty.http2.parser.ServerParser.Listener
ServerParser.Listener.Adapter, ServerParser.Listener.Wrapper
-
Field Summary
Fields inherited from class org.eclipse.jetty.http2.HTTP2Connection
LOG
-
Constructor Summary
ConstructorDescriptionHTTP2ServerConnection
(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, HttpConfiguration httpConfig, HTTP2ServerSession session, int inputBufferSize, ServerSessionListener listener) -
Method Summary
Modifier and TypeMethodDescriptionboolean
static boolean
isSupportedProtocol
(String protocol) newServerHttpChannelOverHTTP2
(Connector connector, HttpConfiguration httpConfig, HttpTransportOverHTTP2 transport) void
void
onNewStream
(Connector connector, IStream stream, HeadersFrame frame) void
onOpen()
Callback method invoked when this connection is opened.void
void
onSessionFailure
(Throwable failure, Callback callback) boolean
onSessionTimeout
(Throwable failure) void
onStreamFailure
(IStream stream, Throwable failure, Callback callback) boolean
onStreamTimeout
(IStream stream, Throwable failure) void
onTrailers
(IStream stream, HeadersFrame frame) void
push
(Connector connector, IStream stream, MetaData.Request request) void
setRecycleHttpChannels
(boolean recycleHttpChannels) boolean
upgrade
(MetaData.Request request, HttpFields.Mutable responseFields) Methods inherited from class org.eclipse.jetty.http2.HTTP2Connection
close, dispatch, getBytesIn, getBytesOut, getMessagesIn, getMessagesOut, getSession, isUseInputDirectByteBuffers, isUseOutputDirectByteBuffers, offerTask, onClose, onConnectionFailure, onData, onFillable, onFlushed, onGoAway, onHeaders, onIdleExpired, onPing, onPriority, onPushPromise, onReset, onSettings, onStreamFailure, onUpgradeTo, onWindowUpdate, produce, setUseInputDirectByteBuffers, setUseOutputDirectByteBuffers
Methods inherited from class org.eclipse.jetty.io.AbstractConnection
addEventListener, failedCallback, fillInterested, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, isFillInterested, onFillInterestedFailed, onReadTimeout, removeEventListener, setInputBufferSize, toConnectionString, toString, tryFillInterested
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.http2.parser.Parser.Listener
onConnectionFailure, onData, onGoAway, onHeaders, onPing, onPriority, onPushPromise, onReset, onSettings, onStreamFailure, onWindowUpdate
-
Constructor Details
-
HTTP2ServerConnection
public HTTP2ServerConnection(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, HttpConfiguration httpConfig, HTTP2ServerSession session, int inputBufferSize, ServerSessionListener listener)
-
-
Method Details
-
isSupportedProtocol
- Parameters:
protocol
- An HTTP2 protocol variant- Returns:
- True if the protocol version is supported
-
isRecycleHttpChannels
public boolean isRecycleHttpChannels() -
setRecycleHttpChannels
public void setRecycleHttpChannels(boolean recycleHttpChannels) -
onOpen
public void onOpen()Description copied from interface:Connection
Callback method invoked when this connection is opened.
Creators of the connection implementation are responsible for calling this method.
- Specified by:
onOpen
in interfaceConnection
- Overrides:
onOpen
in classHTTP2Connection
-
onPreface
public void onPreface()- Specified by:
onPreface
in interfaceServerParser.Listener
-
onNewStream
-
onData
-
onTrailers
-
onStreamTimeout
-
onStreamFailure
-
onSessionTimeout
-
onSessionFailure
-
push
-
newServerHttpChannelOverHTTP2
protected HTTP2ServerConnection.ServerHttpChannelOverHTTP2 newServerHttpChannelOverHTTP2(Connector connector, HttpConfiguration httpConfig, HttpTransportOverHTTP2 transport) -
upgrade
-