ConnectionFactory
, ConnectionFactory.Upgrading
, NegotiatingServerConnection.CipherDiscriminator
, Container
, Destroyable
, Dumpable
, LifeCycle
public class HTTP2CServerConnectionFactory extends HTTP2ServerConnectionFactory implements ConnectionFactory.Upgrading
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 a HTTP1 request of the form "PRI * HTTP/2.0"
is used to trigger a switch to a HTTP2 connection. This approach
allows a single port to accept either HTTP/1 or HTTP/2 direct
connections.
AbstractLifeCycle.AbstractLifeCycleListener
ConnectionFactory.Upgrading
Container.InheritedListener, Container.Listener
HTTP2ServerConnectionFactory.HTTPServerSessionListener
LifeCycle.Listener
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING
Constructor | Description |
---|---|
HTTP2CServerConnectionFactory(HttpConfiguration httpConfiguration) |
|
HTTP2CServerConnectionFactory(HttpConfiguration httpConfiguration,
java.lang.String... protocols) |
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) |
configure, getFactories, getInputBufferSize, getProtocol, getProtocols, setInputBufferSize, toString
getFlowControlStrategyFactory, getHttpConfiguration, getInitialSessionRecvWindow, getInitialStreamRecvWindow, getMaxConcurrentStreams, getMaxDynamicTableSize, getMaxHeaderBlockFragment, getReservedThreads, getStreamIdleTimeout, newConnection, newServerParser, setFlowControlStrategyFactory, setInitialSessionRecvWindow, setInitialStreamRecvWindow, setMaxConcurrentStreams, setMaxDynamicTableSize, setMaxHeaderBlockFragment, setReservedThreads, setStreamIdleTimeout
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
getProtocol, getProtocols, newConnection
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans
newSessionListener
public HTTP2CServerConnectionFactory(@Name("config") HttpConfiguration httpConfiguration)
public HTTP2CServerConnectionFactory(@Name("config") HttpConfiguration httpConfiguration, @Name("protocols") java.lang.String... protocols)
public boolean isAcceptable(java.lang.String protocol, java.lang.String tlsProtocol, java.lang.String tlsCipher)
isAcceptable
in interface NegotiatingServerConnection.CipherDiscriminator
isAcceptable
in class HTTP2ServerConnectionFactory
public Connection upgradeConnection(Connector connector, EndPoint endPoint, MetaData.Request request, HttpFields response101) throws BadMessageException
upgradeConnection
in interface ConnectionFactory.Upgrading
BadMessageException
Copyright © 1995–2017 Webtide. All rights reserved.