Class HTTP2CServerConnectionFactory
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.server.AbstractConnectionFactory
-
- org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory
-
- org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory
-
- org.eclipse.jetty.http2.server.HTTP2CServerConnectionFactory
-
- All Implemented Interfaces:
ConnectionFactory
,ConnectionFactory.Upgrading
,NegotiatingServerConnection.CipherDiscriminator
,Container
,Destroyable
,Dumpable
,Dumpable.DumpableContainer
,LifeCycle
public class HTTP2CServerConnectionFactory extends HTTP2ServerConnectionFactory implements ConnectionFactory.Upgrading
HTTP2 Clear Text Connection factory.This extension of HTTP2ServerConnection Factory sets the protocol name to "h2c" as used by the clear text upgrade mechanism for HTTP2 and marks all TLS ciphers as unacceptable.
If used in combination with a
HttpConnectionFactory
as the default protocol, this factory can support the non-standard direct update mechanism, where an HTTP1 request of the form "PRI * HTTP/2.0" is used to trigger a switch to an HTTP2 connection. This approach allows a single port to accept either HTTP/1 or HTTP/2 direct connections.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory
HTTP2ServerConnectionFactory.HTTPServerSessionListener
-
Nested classes/interfaces inherited from class org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory
AbstractHTTP2ServerConnectionFactory.HTTP2SessionContainer
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.server.ConnectionFactory
ConnectionFactory.Detecting, ConnectionFactory.Upgrading
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description HTTP2CServerConnectionFactory(HttpConfiguration httpConfiguration)
HTTP2CServerConnectionFactory(HttpConfiguration httpConfiguration, java.lang.String... protocols)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isAcceptable(java.lang.String protocol, java.lang.String tlsProtocol, java.lang.String tlsCipher)
Connection
upgradeConnection(Connector connector, EndPoint endPoint, MetaData.Request request, HttpFields response101)
Create a connection for an upgrade request.-
Methods inherited from class org.eclipse.jetty.http2.server.HTTP2ServerConnectionFactory
newSessionListener
-
Methods inherited from class org.eclipse.jetty.http2.server.AbstractHTTP2ServerConnectionFactory
getFlowControlStrategyFactory, getHttpConfiguration, getInitialSessionRecvWindow, getInitialStreamRecvWindow, getMaxConcurrentStreams, getMaxDecoderTableCapacity, getMaxDynamicTableSize, getMaxEncoderTableCapacity, getMaxFrameLength, getMaxFrameSize, getMaxHeaderBlockFragment, getMaxSettingsKeys, getRateControl, getRateControlFactory, getReservedThreads, getStreamIdleTimeout, newConnection, newServerParser, newServerParser, newSettings, setFlowControlStrategyFactory, setInitialSessionRecvWindow, setInitialStreamRecvWindow, setMaxConcurrentStreams, setMaxDecoderTableCapacity, setMaxDynamicTableSize, setMaxEncoderTableCapacity, setMaxFrameLength, setMaxFrameSize, setMaxHeaderBlockFragment, setMaxSettingsKeys, setRateControl, setRateControlFactory, setReservedThreads, setStreamIdleTimeout
-
Methods inherited from class org.eclipse.jetty.server.AbstractConnectionFactory
configure, findNextProtocol, findNextProtocol, getFactories, getInputBufferSize, getProtocol, getProtocols, setInputBufferSize, toString
-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.server.ConnectionFactory
getProtocol, getProtocols, newConnection
-
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
-
-
-
Constructor Detail
-
HTTP2CServerConnectionFactory
public HTTP2CServerConnectionFactory(@Name("config") HttpConfiguration httpConfiguration)
-
HTTP2CServerConnectionFactory
public HTTP2CServerConnectionFactory(@Name("config") HttpConfiguration httpConfiguration, @Name("protocols") java.lang.String... protocols)
-
-
Method Detail
-
isAcceptable
public boolean isAcceptable(java.lang.String protocol, java.lang.String tlsProtocol, java.lang.String tlsCipher)
- Specified by:
isAcceptable
in interfaceNegotiatingServerConnection.CipherDiscriminator
- Overrides:
isAcceptable
in classHTTP2ServerConnectionFactory
-
upgradeConnection
public Connection upgradeConnection(Connector connector, EndPoint endPoint, MetaData.Request request, HttpFields response101) throws BadMessageException
Description copied from interface:ConnectionFactory.Upgrading
Create a connection for an upgrade request.This is a variation of
ConnectionFactory.newConnection(Connector, EndPoint)
that can create (and/or customise) a connection for an upgrade request. Implementations may callConnectionFactory.newConnection(Connector, EndPoint)
or may construct the connection instance themselves.- Specified by:
upgradeConnection
in interfaceConnectionFactory.Upgrading
- Parameters:
connector
- The connector to upgrade for.endPoint
- The endpoint of the connection.request
- The meta data of the upgrade request.response101
- The fields to be sent with the 101 response- Returns:
- Null to indicate that request processing should continue normally without upgrading. A new connection instance to indicate that the upgrade should proceed.
- Throws:
BadMessageException
- Thrown to indicate the upgrade attempt was illegal and that a bad message response should be sent.
-
-