Package io.quarkus.restclient.config
Class RestClientConfig
- java.lang.Object
-
- io.quarkus.restclient.config.RestClientConfig
-
public class RestClientConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description Optional<Integer>connectionPoolSizeThe size of the connection pool for this client.Optional<Integer>connectionTTLThe time in ms for which a connection remains unused in the connection pool before being evicted and closed.Optional<Long>connectTimeoutTimeout specified in milliseconds to wait to connect to the remote endpoint.static RestClientConfigEMPTYOptional<Boolean>followRedirectsA boolean value used to determine whether the client should follow HTTP redirect responses.Map<String,String>headersThe HTTP headers that should be applied to all requests of the rest client.Optional<String>hostnameVerifierThe class name of the host name verifier.Optional<String>keyStoreThe key store location.Optional<String>keyStorePasswordThe key store password.Optional<String>keyStoreTypeThe type of the key store.Optional<Integer>maxRedirectsThe maximum number of redirection a request can follow.Optional<String>nameSet the HTTP client name, used when the client is shared, otherwise ignored.Optional<String>nonProxyHostsHosts to access without proxy This property is applicable to reactive REST clients only.Optional<String>providersMap where keys are fully-qualified provider classnames to include in the client, and values are their integer priorities.Optional<String>proxyAddressA string value in the form of `: ` that specifies the HTTP proxy server hostname (or IP address) and port for requests of this client to use. Optional<String>proxyPasswordProxy password.Optional<String>proxyUserProxy username.Optional<org.eclipse.microprofile.rest.client.ext.QueryParamStyle>queryParamStyleAn enumerated type string value with possible values of "MULTI_PAIRS" (default), "COMMA_SEPARATED", or "ARRAY_PAIRS" that specifies the format in which multiple values for the same query parameter is used.Optional<Long>readTimeoutTimeout specified in milliseconds to wait for a response from the remote endpoint.Optional<String>scopeThe CDI scope to use for injection.Optional<Boolean>sharedSet to true to share the HTTP client between REST clients.Optional<String>trustStoreThe trust store location.Optional<String>trustStorePasswordThe trust store password.Optional<String>trustStoreTypeThe type of the trust store.Optional<String>uriThe base URI to use for this service.Optional<String>urlThe base URL to use for this service.Optional<String>userAgentConfigure the HTTP user-agent header to use.
-
Constructor Summary
Constructors Constructor Description RestClientConfig()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RestClientConfigload(Class<?> interfaceClass)static RestClientConfigload(String configKey)
-
-
-
Field Detail
-
EMPTY
public static final RestClientConfig EMPTY
-
url
@ConfigItem public Optional<String> url
The base URL to use for this service. This property or the `uri` property is considered required, unless the `baseUri` attribute is configured in the `@RegisterRestClient` annotation.
-
uri
@ConfigItem public Optional<String> uri
The base URI to use for this service. This property or the `url` property is considered required, unless the `baseUri` attribute is configured in the `@RegisterRestClient` annotation.
-
scope
@ConfigItem public Optional<String> scope
The CDI scope to use for injection. This property can contain either a fully qualified class name of a CDI scope annotation (such as "javax.enterprise.context.ApplicationScoped") or its simple name (such as "ApplicationScoped").
-
providers
@ConfigItem public Optional<String> providers
Map where keys are fully-qualified provider classnames to include in the client, and values are their integer priorities. The equivalent of the `@RegisterProvider` annotation.
-
connectTimeout
@ConfigItem public Optional<Long> connectTimeout
Timeout specified in milliseconds to wait to connect to the remote endpoint.
-
readTimeout
@ConfigItem public Optional<Long> readTimeout
Timeout specified in milliseconds to wait for a response from the remote endpoint.
-
followRedirects
@ConfigItem public Optional<Boolean> followRedirects
A boolean value used to determine whether the client should follow HTTP redirect responses.
-
proxyAddress
@ConfigItem public Optional<String> proxyAddress
A string value in the form of `: ` that specifies the HTTP proxy server hostname (or IP address) and port for requests of this client to use. Use `none` to disable proxy
-
proxyUser
@ConfigItem public Optional<String> proxyUser
Proxy username. This property is applicable to reactive REST clients only.
-
proxyPassword
@ConfigItem public Optional<String> proxyPassword
Proxy password. This property is applicable to reactive REST clients only.
-
nonProxyHosts
@ConfigItem public Optional<String> nonProxyHosts
Hosts to access without proxy This property is applicable to reactive REST clients only.
-
queryParamStyle
@ConfigItem public Optional<org.eclipse.microprofile.rest.client.ext.QueryParamStyle> queryParamStyle
An enumerated type string value with possible values of "MULTI_PAIRS" (default), "COMMA_SEPARATED", or "ARRAY_PAIRS" that specifies the format in which multiple values for the same query parameter is used.
-
trustStore
@ConfigItem public Optional<String> trustStore
The trust store location. Can point to either a classpath resource or a file.
-
trustStorePassword
@ConfigItem public Optional<String> trustStorePassword
The trust store password.
-
trustStoreType
@ConfigItem public Optional<String> trustStoreType
The type of the trust store. Defaults to "JKS".
-
keyStore
@ConfigItem public Optional<String> keyStore
The key store location. Can point to either a classpath resource or a file.
-
keyStorePassword
@ConfigItem public Optional<String> keyStorePassword
The key store password.
-
keyStoreType
@ConfigItem public Optional<String> keyStoreType
The type of the key store. Defaults to "JKS".
-
hostnameVerifier
@ConfigItem public Optional<String> hostnameVerifier
The class name of the host name verifier. The class must have a public no-argument constructor.
-
connectionTTL
@ConfigItem public Optional<Integer> connectionTTL
The time in ms for which a connection remains unused in the connection pool before being evicted and closed. A timeout of0means there is no timeout.
-
connectionPoolSize
@ConfigItem public Optional<Integer> connectionPoolSize
The size of the connection pool for this client.
-
maxRedirects
@ConfigItem public Optional<Integer> maxRedirects
The maximum number of redirection a request can follow. This property is applicable to reactive REST clients only.
-
headers
@ConfigItem public Map<String,String> headers
The HTTP headers that should be applied to all requests of the rest client.
-
shared
@ConfigItem public Optional<Boolean> shared
Set to true to share the HTTP client between REST clients. There can be multiple shared clients distinguished by name, when no specific name is set, the name__vertx.DEFAULTis used. This property is applicable to reactive REST clients only.
-
name
@ConfigItem public Optional<String> name
Set the HTTP client name, used when the client is shared, otherwise ignored. This property is applicable to reactive REST clients only.
-
userAgent
@ConfigItem public Optional<String> userAgent
Configure the HTTP user-agent header to use. This property is applicable to reactive REST clients only.
-
-
Method Detail
-
load
public static RestClientConfig load(String configKey)
-
load
public static RestClientConfig load(Class<?> interfaceClass)
-
-