Interface HttpClientConfig
-
@ConsumerType public interface HttpClientConfig
HTTP Client configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static int
CONNECT_TIMEOUT_DEFAULT
Default value for connection timeout (in ms)static int
CONNECTION_REQUEST_TIMEOUT_DEFAULT
Default value for connection request timeout (in ms)static String
COOKIE_SPEC_DEFAULT
Default value for cookie specs.static int
MAX_CONNECTIONS_PER_HOST_DEFAULT
Default value for default maximum connections per hoststatic int
MAX_TOTAL_CONNECTIONS_DEFAULT
Default value for maximum total connectionsstatic int
SOCKET_TIMEOUT_DEFAULT
Default value for response timeout (in ms)
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default int
getConnectionRequestTimeout()
Connection request timeout in ms.int
getConnectTimeout()
Connection timeout in ms.default @NotNull String
getCookieSpec()
Standard cookie specification for HttpClient.@Nullable String
getHttpPassword()
Http basic authentication password (optional).@Nullable String
getHttpUser()
Http basic authentication user (optional).@NotNull String
getKeyManagerType()
@Nullable String
getKeyStorePassword()
@Nullable String
getKeyStorePath()
default @Nullable String
getKeyStoreProvider()
@NotNull String
getKeyStoreType()
int
getMaxConnectionsPerHost()
Maximal HTTP connections per host.int
getMaxTotalConnections()
Maximal total HTTP connections.@Nullable String
getProxyHost()
Proxy host (optional).@Nullable String
getProxyPassword()
Proxy password (optional).int
getProxyPort()
Proxy port (optional).@Nullable String
getProxyUser()
Proxy user (optional).int
getSocketTimeout()
Response timeout in ms.@NotNull String
getSslContextType()
@NotNull String
getTrustManagerType()
@Nullable String
getTrustStorePassword()
@Nullable String
getTrustStorePath()
default @Nullable String
getTrustStoreProvider()
@NotNull String
getTrustStoreType()
boolean
isEnabled()
Configuration enabled.boolean
matchesHost(@Nullable String host)
Check if this configuration should be applied to a given host name.default boolean
matchesPath(@Nullable String path)
Check if this configuration should be applied for a given path of the target URLboolean
matchesWsAddressingToUri(@Nullable String addressingToUri)
Check if this configuration should be applied for a given WS addressing to URI.
-
-
-
Field Detail
-
CONNECTION_REQUEST_TIMEOUT_DEFAULT
static final int CONNECTION_REQUEST_TIMEOUT_DEFAULT
Default value for connection request timeout (in ms)- See Also:
- Constant Field Values
-
CONNECT_TIMEOUT_DEFAULT
static final int CONNECT_TIMEOUT_DEFAULT
Default value for connection timeout (in ms)- See Also:
- Constant Field Values
-
SOCKET_TIMEOUT_DEFAULT
static final int SOCKET_TIMEOUT_DEFAULT
Default value for response timeout (in ms)- See Also:
- Constant Field Values
-
MAX_CONNECTIONS_PER_HOST_DEFAULT
static final int MAX_CONNECTIONS_PER_HOST_DEFAULT
Default value for default maximum connections per host- See Also:
- Constant Field Values
-
MAX_TOTAL_CONNECTIONS_DEFAULT
static final int MAX_TOTAL_CONNECTIONS_DEFAULT
Default value for maximum total connections- See Also:
- Constant Field Values
-
COOKIE_SPEC_DEFAULT
static final String COOKIE_SPEC_DEFAULT
Default value for cookie specs.- See Also:
- Constant Field Values
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Configuration enabled.- Returns:
- true if configuration is enabled.
-
getConnectionRequestTimeout
default int getConnectionRequestTimeout()
Connection request timeout in ms.- Returns:
- Connection request timeout in ms.
-
getConnectTimeout
int getConnectTimeout()
Connection timeout in ms.- Returns:
- Connection timeout in ms.
-
getSocketTimeout
int getSocketTimeout()
Response timeout in ms.- Returns:
- Response timeout in ms.
-
getMaxConnectionsPerHost
int getMaxConnectionsPerHost()
Maximal HTTP connections per host.- Returns:
- Maximal HTTP connections per host.
-
getMaxTotalConnections
int getMaxTotalConnections()
Maximal total HTTP connections.- Returns:
- Maximal total HTTP connections.
-
getCookieSpec
@NotNull default @NotNull String getCookieSpec()
Standard cookie specification for HttpClient.- Returns:
- Cookie spec
-
getHttpUser
@Nullable @Nullable String getHttpUser()
Http basic authentication user (optional).- Returns:
- Http user or null.
-
getHttpPassword
@Nullable @Nullable String getHttpPassword()
Http basic authentication password (optional).- Returns:
- Http password or null.
-
getProxyHost
@Nullable @Nullable String getProxyHost()
Proxy host (optional).- Returns:
- Proxy host or null.
-
getProxyPort
int getProxyPort()
Proxy port (optional).- Returns:
- Proxy port or 0.
-
getProxyUser
@Nullable @Nullable String getProxyUser()
Proxy user (optional).- Returns:
- Proxy user or null.
-
getProxyPassword
@Nullable @Nullable String getProxyPassword()
Proxy password (optional).- Returns:
- Proxy password or null.
-
matchesHost
boolean matchesHost(@Nullable @Nullable String host)
Check if this configuration should be applied to a given host name.- Parameters:
host
- Host name- Returns:
- true if configuration matches.
-
matchesWsAddressingToUri
boolean matchesWsAddressingToUri(@Nullable @Nullable String addressingToUri)
Check if this configuration should be applied for a given WS addressing to URI.- Parameters:
addressingToUri
- Web service address- Returns:
- true if configuration matches.
-
matchesPath
default boolean matchesPath(@Nullable @Nullable String path)
Check if this configuration should be applied for a given path of the target URL- Parameters:
path
- Path part- Returns:
- true if configuration matches
-
getSslContextType
@NotNull @NotNull String getSslContextType()
- Returns:
- SSL context type (default: TLS)
-
getKeyManagerType
@NotNull @NotNull String getKeyManagerType()
- Returns:
- Key manager type (default: SunX509)
-
getKeyStoreType
@NotNull @NotNull String getKeyStoreType()
- Returns:
- Key store type (default: PKCS12)
-
getKeyStoreProvider
@Nullable default @Nullable String getKeyStoreProvider()
- Returns:
- Key store provider (default: null = use first matching security provider)
-
getKeyStorePath
@Nullable @Nullable String getKeyStorePath()
- Returns:
- Key store file path
-
getKeyStorePassword
@Nullable @Nullable String getKeyStorePassword()
- Returns:
- Key store password
-
getTrustManagerType
@NotNull @NotNull String getTrustManagerType()
- Returns:
- Trust manager type (default: SunX509)
-
getTrustStoreType
@NotNull @NotNull String getTrustStoreType()
- Returns:
- Trust store type (default: JKS)
-
getTrustStoreProvider
@Nullable default @Nullable String getTrustStoreProvider()
- Returns:
- Trust store provider (default: null = use first matching security provider)
-
getTrustStorePath
@Nullable @Nullable String getTrustStorePath()
- Returns:
- Trust store file path
-
getTrustStorePassword
@Nullable @Nullable String getTrustStorePassword()
- Returns:
- Trust store password
-
-