public final class HttpServerConfig extends ServerTransportConfig<HttpServerConfig>
| Modifier and Type | Method and Description |
|---|---|
ChannelInitializer<Channel> |
channelInitializer(ConnectionObserver connectionObserver,
SocketAddress remoteAddress,
boolean onServer) |
protected Class<? extends Channel> |
channelType(boolean isDomainSocket) |
BiPredicate<HttpServerRequest,HttpServerResponse> |
compressPredicate()
Return the configured compression predicate or null.
|
ServerCookieDecoder |
cookieDecoder()
Deprecated.
as of 1.1.0. This will be removed in 2.0.0 as Netty 5 supports only strict validation.
|
ServerCookieEncoder |
cookieEncoder()
Deprecated.
as of 1.1.0. This will be removed in 2.0.0 as Netty 5 supports only strict validation.
|
HttpRequestDecoderSpec |
decoder()
Return the configured HTTP request decoder options or the default.
|
protected LoggingHandler |
defaultLoggingHandler() |
protected LoopResources |
defaultLoopResources() |
protected ChannelMetricsRecorder |
defaultMetricsRecorder() |
protected ChannelPipelineConfigurer |
defaultOnChannelInit() |
HttpServerFormDecoderProvider |
formDecoderProvider()
Return the configured HTTP form decoder or the default.
|
Http2SettingsSpec |
http2SettingsSpec()
Return the HTTP/2 configuration.
|
Http3SettingsSpec |
http3SettingsSpec()
Return the HTTP/3 configuration.
|
Duration |
idleTimeout()
Return the configured idle timeout for the connection when it is waiting for an HTTP request or null.
|
boolean |
isForwarded()
Returns whether that
HttpServer supports the "Forwarded" and "X-Forwarded-*"
HTTP request headers for deriving information about the connection. |
boolean |
isSecure()
Returns true if that
HttpServer secured via SSL transport. |
protected void |
loggingHandler(LoggingHandler loggingHandler) |
int |
maxKeepAliveRequests()
The configured maximum number of HTTP/1.1 requests which can be served until the connection is closed by the server.
|
protected void |
metricsRecorder(Supplier<? extends ChannelMetricsRecorder> metricsRecorder) |
int |
minCompressionSize()
Compression is performed once response size exceeds the minimum compression size in bytes.
|
HttpProtocol[] |
protocols()
Return the HTTP protocol to support.
|
ProxyProtocolSupportType |
proxyProtocolSupportType()
Return the supported type for the
"HAProxy proxy protocol". |
Duration |
readTimeout()
Return the configured read timeout for the request or null.
|
boolean |
redirectHttpToHttps()
Returns true if that
HttpServer will redirect HTTP to HTTPS by changing
the scheme only but otherwise leaving the port the same when SSL is enabled. |
Duration |
requestTimeout()
Return the configured request timeout for the request or null.
|
SslProvider |
sslProvider()
Returns the current
SslProvider if that HttpServer secured via SSL
transport or null. |
Function<String,String> |
uriTagValue()
Returns the configured function that receives the actual uri and returns the uri tag value
that will be used for the metrics with
Metrics.URI tag. |
childAttributes, childObserver, childOptions, defaultChildObserver, defaultConnectionObserver, doOnBind, doOnBound, doOnConnection, doOnUnbound, eventLoopGroupattributes, bindAddress, bindAddress, channelGroup, channelHash, channelOperationsProvider, connectionFactory, connectionObserver, doOnChannelInit, isPreferNative, loggingHandler, loopResources, metricsRecorder, metricsRecorderInternal, options, updateMap@Nullable public BiPredicate<HttpServerRequest,HttpServerResponse> compressPredicate()
@Deprecated public ServerCookieDecoder cookieDecoder()
ServerCookieDecoder or the default ServerCookieDecoder.STRICT.ServerCookieDecoder or the default ServerCookieDecoder.STRICT@Deprecated public ServerCookieEncoder cookieEncoder()
ServerCookieEncoder or the default ServerCookieEncoder.STRICT.ServerCookieEncoder or the default ServerCookieEncoder.STRICTpublic HttpRequestDecoderSpec decoder()
public HttpServerFormDecoderProvider formDecoderProvider()
@Nullable public Http2SettingsSpec http2SettingsSpec()
@Incubating @Nullable public Http3SettingsSpec http3SettingsSpec()
@Nullable public Duration idleTimeout()
public boolean isForwarded()
HttpServer supports the "Forwarded" and "X-Forwarded-*"
HTTP request headers for deriving information about the connection.HttpServer supports the "Forwarded" and "X-Forwarded-*"
HTTP request headers for deriving information about the connectionpublic boolean isSecure()
HttpServer secured via SSL transport.HttpServer secured via SSL transportpublic int maxKeepAliveRequests()
HttpServer.maxKeepAliveRequests(int)public int minCompressionSize()
public HttpProtocol[] protocols()
HttpProtocol.HTTP11.public ProxyProtocolSupportType proxyProtocolSupportType()
"HAProxy proxy protocol".
The default is ProxyProtocolSupportType.OFF."HAProxy proxy protocol"@Nullable public Duration readTimeout()
public boolean redirectHttpToHttps()
HttpServer will redirect HTTP to HTTPS by changing
the scheme only but otherwise leaving the port the same when SSL is enabled.
This configuration is applicable only for HTTP/1.x.HttpServer will redirect HTTP to HTTPS by changing
the scheme only but otherwise leaving the port the same when SSL is enabled.
This configuration is applicable only for HTTP/1.x.@Nullable public Duration requestTimeout()
@Nullable public SslProvider sslProvider()
SslProvider if that HttpServer secured via SSL
transport or null.SslProvider if that HttpServer secured via SSL
transport or null@Nullable public Function<String,String> uriTagValue()
Metrics.URI tag.Metrics.URI tagpublic ChannelInitializer<Channel> channelInitializer(ConnectionObserver connectionObserver, @Nullable SocketAddress remoteAddress, boolean onServer)
channelInitializer in class TransportConfigprotected Class<? extends Channel> channelType(boolean isDomainSocket)
channelType in class ServerTransportConfig<HttpServerConfig>protected LoggingHandler defaultLoggingHandler()
defaultLoggingHandler in class TransportConfigprotected LoopResources defaultLoopResources()
defaultLoopResources in class TransportConfigprotected ChannelMetricsRecorder defaultMetricsRecorder()
defaultMetricsRecorder in class TransportConfigprotected ChannelPipelineConfigurer defaultOnChannelInit()
defaultOnChannelInit in class ServerTransportConfig<HttpServerConfig>protected void loggingHandler(LoggingHandler loggingHandler)
loggingHandler in class TransportConfigprotected void metricsRecorder(@Nullable Supplier<? extends ChannelMetricsRecorder> metricsRecorder)
metricsRecorder in class TransportConfig