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
,Connection
,Connection.UpgradeTo
,WriteFlusher.Listener
-
Nested Class Summary
Nested ClassesModifier 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
-
Field Summary
Fields inherited from class org.eclipse.jetty.http2.HTTP2Connection
LOG
-
Constructor Summary
ConstructorsConstructorDescriptionHTTP2ServerConnection
(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, ISession session, int inputBufferSize, ServerSessionListener listener) -
Method Summary
Modifier and TypeMethodDescriptionprotected ServerParser
boolean
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
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, onFillable, onFlushed, onIdleExpired, onUpgradeTo, 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
-
Constructor Details
-
HTTP2ServerConnection
public HTTP2ServerConnection(RetainableByteBufferPool retainableByteBufferPool, Executor executor, EndPoint endPoint, HttpConfiguration httpConfig, ServerParser parser, ISession session, int inputBufferSize, ServerSessionListener listener)
-
-
Method Details
-
isSupportedProtocol
- Parameters:
protocol
- An HTTP2 protocol variant- Returns:
- True if the protocol version is supported
-
getParser
- Overrides:
getParser
in classHTTP2Connection
-
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
-
onNewStream
-
onData
-
onTrailers
-
onStreamTimeout
-
onStreamFailure
-
onSessionTimeout
-
onSessionFailure
-
push
-
newServerHttpChannelOverHTTP2
protected HTTP2ServerConnection.ServerHttpChannelOverHTTP2 newServerHttpChannelOverHTTP2(Connector connector, HttpConfiguration httpConfig, HttpTransportOverHTTP2 transport) -
upgrade
-