public final class HttpServerConfig extends ServerTransportConfig<HttpServerConfig>
Modifier and Type | Method and Description |
---|---|
java.util.function.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() |
Http2SettingsSpec |
http2SettingsSpec()
Return the HTTP/2 configuration
|
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) |
protected void |
metricsRecorder(java.util.function.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" . |
SslProvider |
sslProvider()
Returns the current
SslProvider if that TcpServer secured via SSL
transport or null |
java.util.function.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, eventLoopGroup
attributes, bindAddress, channelGroup, channelHash, channelInitializer, channelOperationsProvider, connectionFactory, connectionObserver, doOnChannelInit, isPreferNative, loggingHandler, loopResources, metricsRecorder, options, updateMap
@Nullable public java.util.function.BiPredicate<HttpServerRequest,HttpServerResponse> compressPredicate()
public ServerCookieDecoder cookieDecoder()
ServerCookieDecoder
or the default ServerCookieDecoder.STRICT
.ServerCookieDecoder
or the default ServerCookieDecoder.STRICT
public ServerCookieEncoder cookieEncoder()
ServerCookieEncoder
or the default ServerCookieEncoder.STRICT
.ServerCookieEncoder
or the default ServerCookieEncoder.STRICT
public HttpRequestDecoderSpec decoder()
public Http2SettingsSpec http2SettingsSpec()
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 minCompressionSize()
public HttpProtocol[] protocols()
HttpProtocol.HTTP11
.public ProxyProtocolSupportType proxyProtocolSupportType()
"HAProxy proxy protocol"
.
The default is ProxyProtocolSupportType.OFF
."HAProxy proxy protocol"
@Nullable public SslProvider sslProvider()
SslProvider
if that TcpServer
secured via SSL
transport or nullSslProvider
if that TcpServer
secured via SSL
transport or null@Nullable public java.util.function.Function<String,String> uriTagValue()
Metrics.URI
tagMetrics.URI
tagprotected LoggingHandler defaultLoggingHandler()
TransportConfig
LoggingHandler
to wiretap this transportdefaultLoggingHandler
in class TransportConfig
LoggingHandler
to wiretap this transportprotected LoopResources defaultLoopResources()
TransportConfig
LoopResources
for this transportdefaultLoopResources
in class TransportConfig
LoopResources
for this transportprotected ChannelMetricsRecorder defaultMetricsRecorder()
TransportConfig
defaultMetricsRecorder
in class TransportConfig
protected ChannelPipelineConfigurer defaultOnChannelInit()
TransportConfig
ChannelPipelineConfigurer.emptyConfigurer()
defaultOnChannelInit
in class ServerTransportConfig<HttpServerConfig>
ChannelPipelineConfigurer.emptyConfigurer()
protected void loggingHandler(LoggingHandler loggingHandler)
loggingHandler
in class TransportConfig
protected void metricsRecorder(@Nullable java.util.function.Supplier<? extends ChannelMetricsRecorder> metricsRecorder)
metricsRecorder
in class TransportConfig