public final class HttpServerConfig extends ServerTransportConfig<HttpServerConfig>
| Modifier and Type | Method and Description |
|---|---|
BiPredicate<HttpServerRequest,HttpServerResponse> |
compressPredicate()
Return the configured compression predicate or null.
|
ServerCookieDecoder |
cookieDecoder()
Return the configured
ServerCookieDecoder or the default ServerCookieDecoder.STRICT. |
ServerCookieEncoder |
cookieEncoder()
Return the configured
ServerCookieEncoder or the default ServerCookieEncoder.STRICT. |
HttpRequestDecoderSpec |
decoder()
Return the configured HTTP request decoder options or the default.
|
protected LoggingHandler |
defaultLoggingHandler()
Return the default
LoggingHandler to wiretap this transport |
protected LoopResources |
defaultLoopResources()
Return the default
LoopResources for this transport |
protected ChannelMetricsRecorder |
defaultMetricsRecorder()
Return the configured metrics recorder.
|
protected ChannelPipelineConfigurer |
defaultOnChannelInit()
Return the default callback if any or
ChannelPipelineConfigurer.emptyConfigurer() |
HttpServerFormDecoderProvider |
formDecoderProvider()
Return the configured HTTP form decoder or the default.
|
Http2SettingsSpec |
http2SettingsSpec()
Return the HTTP/2 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)
Obtains immediately the
ChannelMetricsRecorder from the provided Supplier |
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". |
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. |
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 |
channelType, childAttributes, childObserver, childOptions, defaultChildObserver, defaultConnectionObserver, doOnBind, doOnBound, doOnConnection, doOnUnbound, eventLoopGroupattributes, bindAddress, channelGroup, channelHash, channelInitializer, channelOperationsProvider, connectionFactory, connectionObserver, doOnChannelInit, isPreferNative, loggingHandler, loopResources, metricsRecorder, metricsRecorderInternal, options, updateMap@Nullable public BiPredicate<HttpServerRequest,HttpServerResponse> compressPredicate()
public ServerCookieDecoder cookieDecoder()
ServerCookieDecoder or the default ServerCookieDecoder.STRICT.ServerCookieDecoder or the default ServerCookieDecoder.STRICTpublic ServerCookieEncoder cookieEncoder()
ServerCookieEncoder or the default ServerCookieEncoder.STRICT.ServerCookieEncoder or the default ServerCookieEncoder.STRICTpublic HttpRequestDecoderSpec decoder()
public HttpServerFormDecoderProvider formDecoderProvider()
public Http2SettingsSpec http2SettingsSpec()
@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 transportHttpServer 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"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 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 tagMetrics.URI tagprotected LoggingHandler defaultLoggingHandler()
TransportConfigLoggingHandler to wiretap this transportdefaultLoggingHandler in class TransportConfigLoggingHandler to wiretap this transportprotected LoopResources defaultLoopResources()
TransportConfigLoopResources for this transportdefaultLoopResources in class TransportConfigLoopResources for this transportprotected ChannelMetricsRecorder defaultMetricsRecorder()
TransportConfigdefaultMetricsRecorder in class TransportConfigprotected ChannelPipelineConfigurer defaultOnChannelInit()
TransportConfigChannelPipelineConfigurer.emptyConfigurer()defaultOnChannelInit in class ServerTransportConfig<HttpServerConfig>ChannelPipelineConfigurer.emptyConfigurer()protected void loggingHandler(LoggingHandler loggingHandler)
loggingHandler in class TransportConfigprotected void metricsRecorder(@Nullable Supplier<? extends ChannelMetricsRecorder> metricsRecorder)
TransportConfigChannelMetricsRecorder from the provided SuppliermetricsRecorder in class TransportConfigmetricsRecorder - a supplier for the ChannelMetricsRecorder