Record Class ClientHttpConnectorSettings
java.lang.Object
java.lang.Record
org.springframework.boot.http.client.reactive.ClientHttpConnectorSettings
- Record Components:
redirects
- the follow redirect strategy to use or null to redirect whenever the underlying library allows itconnectTimeout
- the connect timeoutreadTimeout
- the read timeoutsslBundle
- the SSL bundle providing SSL configuration
public record ClientHttpConnectorSettings(HttpRedirects redirects, @Nullable Duration connectTimeout, @Nullable Duration readTimeout, @Nullable SslBundle sslBundle)
extends Record
Settings that can be applied when creating a
ClientHttpConnector
.- Since:
- 3.5.0
- Author:
- Phillip Webb
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionClientHttpConnectorSettings
(@Nullable HttpRedirects redirects, @Nullable Duration connectTimeout, @Nullable Duration readTimeout, @Nullable SslBundle sslBundle) Creates an instance of aClientHttpConnectorSettings
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Duration
Returns the value of theconnectTimeout
record component.static ClientHttpConnectorSettings
defaults()
Use defaults for theClientHttpConnector
which can differ depending on the implementation.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static ClientHttpConnectorSettings
ofSslBundle
(@Nullable SslBundle sslBundle) Return a newClientHttpConnectorSettings
using defaults for all settings other than the provided SSL bundle.@Nullable Duration
Returns the value of thereadTimeout
record component.Returns the value of theredirects
record component.@Nullable SslBundle
Returns the value of thesslBundle
record component.final String
toString()
Returns a string representation of this record class.withConnectTimeout
(@Nullable Duration connectTimeout) Return a newClientHttpConnectorSettings
instance with an updated connect timeout setting.withReadTimeout
(@Nullable Duration readTimeout) Return a newClientHttpConnectorSettings
instance with an updated read timeout setting.withRedirects
(@Nullable HttpRedirects redirects) Return a newClientHttpConnectorSettings
instance with an updated redirect setting.withSslBundle
(@Nullable SslBundle sslBundle) Return a newClientHttpConnectorSettings
instance with an updated SSL bundle setting.withTimeouts
(@Nullable Duration connectTimeout, @Nullable Duration readTimeout) Return a newClientHttpConnectorSettings
instance with an updated connect and read timeout setting.
-
Constructor Details
-
ClientHttpConnectorSettings
public ClientHttpConnectorSettings(@Nullable HttpRedirects redirects, @Nullable Duration connectTimeout, @Nullable Duration readTimeout, @Nullable SslBundle sslBundle) Creates an instance of aClientHttpConnectorSettings
record class.- Parameters:
redirects
- the value for theredirects
record componentconnectTimeout
- the value for theconnectTimeout
record componentreadTimeout
- the value for thereadTimeout
record componentsslBundle
- the value for thesslBundle
record component
-
-
Method Details
-
withConnectTimeout
Return a newClientHttpConnectorSettings
instance with an updated connect timeout setting.- Parameters:
connectTimeout
- the new connect timeout setting- Returns:
- a new
ClientHttpConnectorSettings
instance
-
withReadTimeout
Return a newClientHttpConnectorSettings
instance with an updated read timeout setting.- Parameters:
readTimeout
- the new read timeout setting- Returns:
- a new
ClientHttpConnectorSettings
instance
-
withTimeouts
public ClientHttpConnectorSettings withTimeouts(@Nullable Duration connectTimeout, @Nullable Duration readTimeout) Return a newClientHttpConnectorSettings
instance with an updated connect and read timeout setting.- Parameters:
connectTimeout
- the new connect timeout settingreadTimeout
- the new read timeout setting- Returns:
- a new
ClientHttpConnectorSettings
instance
-
withSslBundle
Return a newClientHttpConnectorSettings
instance with an updated SSL bundle setting.- Parameters:
sslBundle
- the new SSL bundle setting- Returns:
- a new
ClientHttpConnectorSettings
instance
-
withRedirects
Return a newClientHttpConnectorSettings
instance with an updated redirect setting.- Parameters:
redirects
- the new redirects setting- Returns:
- a new
ClientHttpConnectorSettings
instance
-
ofSslBundle
Return a newClientHttpConnectorSettings
using defaults for all settings other than the provided SSL bundle.- Parameters:
sslBundle
- the SSL bundle setting- Returns:
- a new
ClientHttpConnectorSettings
instance
-
defaults
Use defaults for theClientHttpConnector
which can differ depending on the implementation.- Returns:
- default settings
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
redirects
-
connectTimeout
Returns the value of theconnectTimeout
record component.- Returns:
- the value of the
connectTimeout
record component
-
readTimeout
Returns the value of thereadTimeout
record component.- Returns:
- the value of the
readTimeout
record component
-
sslBundle
-