Package io.micronaut.http.client
Class DefaultHttpClientConfiguration
java.lang.Object
io.micronaut.http.client.HttpClientConfiguration
io.micronaut.http.client.DefaultHttpClientConfiguration
@ConfigurationProperties("micronaut.http.client")
@Primary
public class DefaultHttpClientConfiguration
extends HttpClientConfiguration
The default configuration if no explicit configuration is specified for an HTTP client.
- Since:
- 1.0
- Author:
- graemerocher
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The default connection pool configuration.static class
The default HTTP/2 configuration.static class
The default WebSocket compression configuration.Nested classes/interfaces inherited from class io.micronaut.http.client.HttpClientConfiguration
HttpClientConfiguration.ConnectionPoolConfiguration, HttpClientConfiguration.DnsResolutionMode, HttpClientConfiguration.Http2ClientConfiguration, HttpClientConfiguration.WebSocketCompressionConfiguration
-
Field Summary
Fields inherited from class io.micronaut.http.client.HttpClientConfiguration
DEFAULT_ALLOW_BLOCK_EVENT_LOOP, DEFAULT_CONNECTION_POOL_IDLE_TIMEOUT_SECONDS, DEFAULT_DNS_RESOLUTION_MODE, DEFAULT_EXCEPTION_ON_ERROR_STATUS, DEFAULT_FOLLOW_REDIRECTS, DEFAULT_MAX_CONTENT_LENGTH, DEFAULT_READ_IDLE_TIMEOUT_MINUTES, DEFAULT_READ_TIMEOUT_SECONDS, DEFAULT_SHUTDOWN_QUIET_PERIOD_MILLISECONDS, DEFAULT_SHUTDOWN_TIMEOUT_MILLISECONDS
-
Constructor Summary
ConstructorDescriptionDefault constructor.DefaultHttpClientConfiguration
(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, DefaultHttpClientConfiguration.DefaultWebSocketCompressionConfiguration webSocketCompressionConfiguration, DefaultHttpClientConfiguration.DefaultHttp2ClientConfiguration http2Configuration, ApplicationConfiguration applicationConfiguration) DefaultHttpClientConfiguration
(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, DefaultHttpClientConfiguration.DefaultWebSocketCompressionConfiguration webSocketCompressionConfiguration, ApplicationConfiguration applicationConfiguration) Deprecated.DefaultHttpClientConfiguration
(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, ApplicationConfiguration applicationConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionObtains the connection pool configuration.Obtains the HTTP/2 configuration.Obtains the WebSocket compression configuration.void
setClientSslConfiguration
(@Nullable ClientSslConfiguration sslConfiguration) Uses the default SSL configuration.Methods inherited from class io.micronaut.http.client.HttpClientConfiguration
getAddressResolverGroupName, getAlpnModes, getChannelOptions, getConnectionPoolIdleTimeout, getConnectTimeout, getConnectTtl, getDefaultCharset, getDnsResolutionMode, getEventLoopGroup, getHttpVersion, getLoggerName, getLogLevel, getMaxContentLength, getNumOfThreads, getPcapLoggingPathPattern, getPlaintextMode, getProxyAddress, getProxyPassword, getProxySelector, getProxyType, getProxyUsername, getReadIdleTimeout, getReadTimeout, getRequestTimeout, getShutdownQuietPeriod, getShutdownTimeout, getSslConfiguration, getThreadFactory, isAllowBlockEventLoop, isExceptionOnErrorStatus, isFollowRedirects, resolveProxy, setAddressResolverGroupName, setAllowBlockEventLoop, setAlpnModes, setChannelOptions, setConnectionPoolIdleTimeout, setConnectTimeout, setConnectTtl, setDefaultCharset, setDnsResolutionMode, setEventLoopGroup, setExceptionOnErrorStatus, setFollowRedirects, setHttpVersion, setLoggerName, setLogLevel, setMaxContentLength, setNumOfThreads, setPcapLoggingPathPattern, setPlaintextMode, setProxyAddress, setProxyPassword, setProxySelector, setProxyType, setProxyUsername, setReadIdleTimeout, setReadTimeout, setRequestTimeout, setShutdownQuietPeriod, setShutdownTimeout, setSslConfiguration, setThreadFactory
-
Field Details
-
PREFIX
Prefix for HTTP Client settings.- See Also:
-
-
Constructor Details
-
DefaultHttpClientConfiguration
public DefaultHttpClientConfiguration()Default constructor. -
DefaultHttpClientConfiguration
@Deprecated(since="4.3.0") public DefaultHttpClientConfiguration(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, ApplicationConfiguration applicationConfiguration) - Parameters:
connectionPoolConfiguration
- The connection pool configurationapplicationConfiguration
- The application configuration
-
DefaultHttpClientConfiguration
@Deprecated(since="4.6.0") public DefaultHttpClientConfiguration(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, DefaultHttpClientConfiguration.DefaultWebSocketCompressionConfiguration webSocketCompressionConfiguration, ApplicationConfiguration applicationConfiguration) - Parameters:
connectionPoolConfiguration
- The connection pool configurationwebSocketCompressionConfiguration
- The WebSocket compression configurationapplicationConfiguration
- The application configuration
-
DefaultHttpClientConfiguration
@Inject public DefaultHttpClientConfiguration(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, DefaultHttpClientConfiguration.DefaultWebSocketCompressionConfiguration webSocketCompressionConfiguration, DefaultHttpClientConfiguration.DefaultHttp2ClientConfiguration http2Configuration, ApplicationConfiguration applicationConfiguration) - Parameters:
connectionPoolConfiguration
- The connection pool configurationwebSocketCompressionConfiguration
- The WebSocket compression configurationhttp2Configuration
- The HTTP/2 configurationapplicationConfiguration
- The application configuration
-
-
Method Details
-
getConnectionPoolConfiguration
Description copied from class:HttpClientConfiguration
Obtains the connection pool configuration.- Specified by:
getConnectionPoolConfiguration
in classHttpClientConfiguration
- Returns:
- The connection pool configuration.
-
getWebSocketCompressionConfiguration
public HttpClientConfiguration.WebSocketCompressionConfiguration getWebSocketCompressionConfiguration()Description copied from class:HttpClientConfiguration
Obtains the WebSocket compression configuration.- Overrides:
getWebSocketCompressionConfiguration
in classHttpClientConfiguration
- Returns:
- The WebSocket compression configuration.
-
setClientSslConfiguration
@Inject public void setClientSslConfiguration(@Nullable @Nullable ClientSslConfiguration sslConfiguration) Uses the default SSL configuration.- Parameters:
sslConfiguration
- The SSL configuration
-
getHttp2Configuration
Description copied from class:HttpClientConfiguration
Obtains the HTTP/2 configuration.- Overrides:
getHttp2Configuration
in classHttpClientConfiguration
- Returns:
- The HTTP/2 configuration.
-
DefaultHttpClientConfiguration(io.micronaut.http.client.DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration,io.micronaut.http.client.DefaultHttpClientConfiguration.DefaultWebSocketCompressionConfiguration,io.micronaut.http.client.DefaultHttpClientConfiguration.DefaultHttp2ClientConfiguration,io.micronaut.runtime.ApplicationConfiguration)
instead.