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 WebSocket compression configuration.Nested classes/interfaces inherited from class io.micronaut.http.client.HttpClientConfiguration
HttpClientConfiguration.ConnectionPoolConfiguration, 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_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, ApplicationConfiguration applicationConfiguration) DefaultHttpClientConfiguration
(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, ApplicationConfiguration applicationConfiguration) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionObtains the connection pool 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
getAlpnModes, getChannelOptions, getConnectionPoolIdleTimeout, getConnectTimeout, getConnectTtl, getDefaultCharset, getEventLoopGroup, getHttpVersion, getLoggerName, getLogLevel, getMaxContentLength, getNumOfThreads, getPlaintextMode, getProxyAddress, getProxyPassword, getProxySelector, getProxyType, getProxyUsername, getReadIdleTimeout, getReadTimeout, getShutdownQuietPeriod, getShutdownTimeout, getSslConfiguration, getThreadFactory, isAllowBlockEventLoop, isExceptionOnErrorStatus, isFollowRedirects, resolveProxy, setAllowBlockEventLoop, setAlpnModes, setChannelOptions, setConnectionPoolIdleTimeout, setConnectTimeout, setConnectTtl, setDefaultCharset, setEventLoopGroup, setExceptionOnErrorStatus, setFollowRedirects, setHttpVersion, setLoggerName, setLogLevel, setMaxContentLength, setNumOfThreads, setPlaintextMode, setProxyAddress, setProxyPassword, setProxySelector, setProxyType, setProxyUsername, setReadIdleTimeout, setReadTimeout, 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
@Inject public DefaultHttpClientConfiguration(DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration connectionPoolConfiguration, DefaultHttpClientConfiguration.DefaultWebSocketCompressionConfiguration webSocketCompressionConfiguration, ApplicationConfiguration applicationConfiguration) - Parameters:
connectionPoolConfiguration
- The connection pool configurationwebSocketCompressionConfiguration
- The WebSocket compression 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
-
DefaultHttpClientConfiguration(io.micronaut.http.client.DefaultHttpClientConfiguration.DefaultConnectionPoolConfiguration,io.micronaut.http.client.DefaultHttpClientConfiguration.DefaultWebSocketCompressionConfiguration,io.micronaut.runtime.ApplicationConfiguration)
instead.