Class RestClientsConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionIf the Application-Layer Protocol Negotiation is enabled, the client will negotiate which protocol to use over the protocols exposed by the server.booleanIftrue, the stacktrace of the invocation of the REST Client method is captured.(package private) Map<String,RestClientConfig> Configurations of REST client instances.The size of the connection pool for this client.The time in ms for which a connection remains unused in the connection pool before being evicted and closed.A timeout in milliseconds that REST clients should wait to connect to the remote endpoint.booleanIf true, the REST clients will not provide additional contextual information (like REST client class and method names) when exception occurs during a client invocation.By default, REST Client Reactive uses text/plain content type for String values and application/json for everything else.A boolean value used to determine whether the client should follow HTTP redirect responses.The HTTP headers that should be applied to all requests of the rest client.The class name of the host name verifier.booleanIf this is true then HTTP/2 will be enabled.If set to false disables the keep alive completely.The key store location.The key store password.The type of the key store.The max HTTP chunk size (8096 bytes by default).The maximum number of redirection a request can follow.Mode in which the form data are encoded.Hosts to access without proxy, similar to the http.nonProxyHosts or https.nonProxyHosts JVM settings.Map where keys are fully-qualified provider classnames to include in the client, and values are their integer priorities.A string value in the form of `: ` that specifies the HTTP proxy server hostname (or IP address) and port for requests of clients to use. Proxy password, equivalent to the http.proxyPassword or https.proxyPassword JVM settings.Proxy username, equivalent to the http.proxy or https.proxy JVM settings.Optional<org.eclipse.microprofile.rest.client.ext.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.A timeout in milliseconds that REST clients should wait for a response from the remote endpoint.The CDI scope to use for injections of REST client instances.The trust store location.The trust store password.The type of the trust store.Default configuration for the HTTP user-agent header to use in all REST clients.Set whether hostname verification is enabled. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClientConfig(Class<?> clientInterface) getClientConfig(String configKey) static RestClientsConfigvoidputClientConfig(Class<?> clientInterface, RestClientConfig clientConfig) voidputClientConfig(String configKey, RestClientConfig clientConfig)
-
Field Details
-
configKey
Configurations of REST client instances.The key can be either the value of the configKey parameter of a `@RegisterRestClient` annotation, or the name of a class bearing that annotation, in which case it is possible to use the short name, as well as fully qualified name.
-
disableSmartProduces
By default, REST Client Reactive uses text/plain content type for String values and application/json for everything else.MicroProfile Rest Client spec requires the implementations to always default to application/json. This build item disables the "smart" behavior of RESTEasy Reactive to comply to the spec.
This property is applicable to reactive REST clients only.
-
multipartPostEncoderMode
Mode in which the form data are encoded. Possible values are `HTML5`, `RFC1738` and `RFC3986`. The modes are described in the Netty documentationBy default, Rest Client Reactive uses RFC1738.
This property is applicable to reactive REST clients only.
-
proxyAddress
A string value in the form of `: ` that specifies the HTTP proxy server hostname (or IP address) and port for requests of clients to use. Can be overwritten by client-specific settings.
-
proxyUser
Proxy username, equivalent to the http.proxy or https.proxy JVM settings.Can be overwritten by client-specific settings.
This property is applicable to reactive REST clients only.
-
proxyPassword
Proxy password, equivalent to the http.proxyPassword or https.proxyPassword JVM settings.Can be overwritten by client-specific settings.
This property is applicable to reactive REST clients only.
-
nonProxyHosts
Hosts to access without proxy, similar to the http.nonProxyHosts or https.nonProxyHosts JVM settings. Please note that unlike the JVM settings, this property is empty by default.Can be overwritten by client-specific settings.
This property is applicable to reactive REST clients only.
-
logging
-
multipart
-
connectTimeout
A timeout in milliseconds that REST clients should wait to connect to the remote endpoint.Can be overwritten by client-specific settings.
-
readTimeout
A timeout in milliseconds that REST clients should wait for a response from the remote endpoint.Can be overwritten by client-specific settings.
-
disableContextualErrorMessages
If true, the REST clients will not provide additional contextual information (like REST client class and method names) when exception occurs during a client invocation.This property is applicable to reactive REST clients only.
-
userAgent
Default configuration for the HTTP user-agent header to use in all REST clients.Can be overwritten by client-specific settings.
This property is applicable to reactive REST clients only.
-
headers
The HTTP headers that should be applied to all requests of the rest client. -
hostnameVerifier
The class name of the host name verifier. The class must have a public no-argument constructor.Can be overwritten by client-specific settings.
-
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.Can be overwritten by client-specific settings.
-
connectionPoolSize
The size of the connection pool for this client.Can be overwritten by client-specific settings.
-
keepAliveEnabled
If set to false disables the keep alive completely.Can be overwritten by client-specific settings.
-
maxRedirects
The maximum number of redirection a request can follow.Can be overwritten by client-specific settings.
This property is applicable to reactive REST clients only.
-
followRedirects
A boolean value used to determine whether the client should follow HTTP redirect responses.Can be overwritten by client-specific settings.
-
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.Can be overwritten by client-specific settings.
-
scope
The CDI scope to use for injections of REST client instances. Value can be either a fully qualified class name of a CDI scope annotation (such as "jakarta.enterprise.context.ApplicationScoped") or its simple name (such as"ApplicationScoped").Default scope for the rest-client extension is "Dependent" (which is the spec-compliant behavior).
Default scope for the rest-client-reactive extension is "ApplicationScoped".
Can be overwritten by client-specific settings.
-
queryParamStyle
@ConfigItem public 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.Can be overwritten by client-specific settings.
-
verifyHost
Set whether hostname verification is enabled. Default is enabled. This setting should not be disabled in production as it makes the client vulnerable to MITM attacks.Can be overwritten by client-specific settings.
-
trustStore
The trust store location. Can point to either a classpath resource or a file.Can be overwritten by client-specific settings.
-
trustStorePassword
The trust store password.Can be overwritten by client-specific settings.
-
trustStoreType
The type of the trust store. Defaults to "JKS".Can be overwritten by client-specific settings.
-
keyStore
The key store location. Can point to either a classpath resource or a file.Can be overwritten by client-specific settings.
-
keyStorePassword
The key store password.Can be overwritten by client-specific settings.
-
keyStoreType
The type of the key store. Defaults to "JKS".Can be overwritten by client-specific settings.
-
http2
If this is true then HTTP/2 will be enabled. -
maxChunkSize
The max HTTP chunk size (8096 bytes by default).Can be overwritten by client-specific settings.
-
alpn
If the Application-Layer Protocol Negotiation is enabled, the client will negotiate which protocol to use over the protocols exposed by the server. By default, it will try to use HTTP/2 first and if it's not enabled, it will use HTTP/1.1. When the property `http2` is enabled, this flag will be automatically enabled. -
captureStacktrace
Iftrue, the stacktrace of the invocation of the REST Client method is captured. This stacktrace will be used if the invocation throws an exception
-
-
Constructor Details
-
RestClientsConfig
public RestClientsConfig()
-
-
Method Details
-
getClientConfig
-
getClientConfig
-
putClientConfig
-
putClientConfig
-
getConfigKeys
-
getInstance
-