public final class HttpClientConfig extends ClientTransportConfig<HttpClientConfig>
| Modifier and Type | Method and Description |
|---|---|
String |
baseUrl()
Return the configured base URL to use for this request/response or null.
|
int |
channelHash() |
ChannelOperations.OnSetup |
channelOperationsProvider()
Return the associated
ChannelOperations.OnSetup, config implementations might override this |
ConnectionProvider |
connectionProvider()
Return the
ConnectionProvider |
ClientCookieDecoder |
cookieDecoder()
Deprecated.
as of 1.1.0. This will be removed in 2.0.0 as Netty 5 supports only strict validation.
|
ClientCookieEncoder |
cookieEncoder()
Deprecated.
as of 1.1.0. This will be removed in 2.0.0 as Netty 5 supports only strict validation.
|
HttpResponseDecoderSpec |
decoder()
Return the configured HTTP response decoder options or the default.
|
AddressResolverGroup<?> |
defaultAddressResolverGroup()
Provides a global
AddressResolverGroup from HttpResources
that is shared amongst all HTTP clients. |
protected ConnectionObserver |
defaultConnectionObserver()
Return the configured default
ConnectionObserver. |
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() |
BiPredicate<HttpClientRequest,HttpClientResponse> |
followRedirectPredicate()
Return the configured follow redirect predicate or null.
|
HttpHeaders |
headers()
Return a copy of the request headers.
|
Http2SettingsSpec |
http2SettingsSpec()
Return the HTTP/2 configuration
|
boolean |
isAcceptGzip()
Return whether GZip compression is enabled.
|
boolean |
isRetryDisabled()
Return true if
retry once is disabled, false otherwise. |
boolean |
isSecure()
Returns true if that
HttpClient secured via SSL transport |
protected void |
loggingHandler(LoggingHandler loggingHandler) |
HttpMethod |
method()
Return the configured request method.
|
protected void |
metricsRecorder(Supplier<? extends ChannelMetricsRecorder> metricsRecorder)
Obtains immediately the
ChannelMetricsRecorder from the provided Supplier |
HttpProtocol[] |
protocols()
Return the HTTP protocol to support.
|
protected void |
proxyProvider(ProxyProvider proxyProvider) |
BiConsumer<HttpHeaders,HttpClientRequest> |
redirectRequestBiConsumer()
Return the configured redirect request
BiConsumer or null. |
Consumer<HttpClientRequest> |
redirectRequestConsumer()
Return the configured redirect request consumer or null.
|
protected AddressResolverGroup<?> |
resolverInternal() |
Duration |
responseTimeout()
Return the configured response timeout or null
|
SslProvider |
sslProvider()
Returns the current
SslProvider if that HttpClient secured via SSL
transport or null |
String |
uri()
Return the configured request uri.
|
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 |
WebsocketClientSpec |
websocketClientSpec()
Return the configured websocket client configuration.
|
channelType, doOnConnect, doOnConnected, doOnDisconnected, eventLoopGroup, getNameResolverProvider, hasProxy, proxyProvider, remoteAddress, resolverattributes, bindAddress, channelGroup, channelInitializer, connectionFactory, connectionObserver, doOnChannelInit, isPreferNative, loggingHandler, loopResources, metricsRecorder, metricsRecorderInternal, options, updateMap@Nullable public String baseUrl()
public int channelHash()
channelHash in class ClientTransportConfig<HttpClientConfig>public ChannelOperations.OnSetup channelOperationsProvider()
TransportConfigChannelOperations.OnSetup, config implementations might override thischannelOperationsProvider in class TransportConfigChannelOperations.OnSetuppublic ConnectionProvider connectionProvider()
ClientTransportConfigConnectionProviderconnectionProvider in class ClientTransportConfig<HttpClientConfig>ConnectionProvider@Deprecated public ClientCookieDecoder cookieDecoder()
ClientCookieDecoder or the default ClientCookieDecoder.STRICT.ClientCookieDecoder or the default ClientCookieDecoder.STRICT@Deprecated public ClientCookieEncoder cookieEncoder()
ClientCookieEncoder or the default ClientCookieEncoder.STRICT.ClientCookieEncoder or the default ClientCookieEncoder.STRICTpublic HttpResponseDecoderSpec decoder()
@Nullable public BiPredicate<HttpClientRequest,HttpClientResponse> followRedirectPredicate()
public HttpHeaders headers()
public Http2SettingsSpec http2SettingsSpec()
public boolean isAcceptGzip()
public boolean isRetryDisabled()
retry once is disabled, false otherwise.retry once is disabled, false otherwisepublic boolean isSecure()
HttpClient secured via SSL transportHttpClient secured via SSL transportpublic HttpMethod method()
public HttpProtocol[] protocols()
HttpProtocol.HTTP11.@Nullable public BiConsumer<HttpHeaders,HttpClientRequest> redirectRequestBiConsumer()
BiConsumer or null.BiConsumer or null@Nullable public Consumer<HttpClientRequest> redirectRequestConsumer()
@Nullable public Duration responseTimeout()
@Nullable public SslProvider sslProvider()
SslProvider if that HttpClient secured via SSL
transport or nullSslProvider if that HttpClient secured via SSL
transport or nullpublic String uri()
@Nullable public Function<String,String> uriTagValue()
Metrics.URI tagMetrics.URI tagpublic WebsocketClientSpec websocketClientSpec()
public AddressResolverGroup<?> defaultAddressResolverGroup()
AddressResolverGroup from HttpResources
that is shared amongst all HTTP clients. AddressResolverGroup uses the global
LoopResources from HttpResources.defaultAddressResolverGroup in class ClientTransportConfig<HttpClientConfig>AddressResolverGroupprotected ConnectionObserver defaultConnectionObserver()
TransportConfigConnectionObserver.defaultConnectionObserver in class ClientTransportConfig<HttpClientConfig>ConnectionObserverprotected 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 ClientTransportConfig<HttpClientConfig>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 ChannelMetricsRecorderprotected void proxyProvider(ProxyProvider proxyProvider)
proxyProvider in class ClientTransportConfig<HttpClientConfig>protected AddressResolverGroup<?> resolverInternal()
resolverInternal in class ClientTransportConfig<HttpClientConfig>