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, Duration connectTimeout, Duration readTimeout, 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(HttpRedirects redirects, Duration connectTimeout, Duration readTimeout, SslBundle sslBundle) Creates an instance of aClientHttpConnectorSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectTimeoutrecord component.static ClientHttpConnectorSettingsdefaults()Use defaults for theClientHttpConnectorwhich can differ depending on the implementation.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ClientHttpConnectorSettingsofSslBundle(SslBundle sslBundle) Return a newClientHttpConnectorSettingsusing defaults for all settings other than the provided SSL bundle.Returns the value of thereadTimeoutrecord component.Returns the value of theredirectsrecord component.Returns the value of thesslBundlerecord component.final StringtoString()Returns a string representation of this record class.withConnectTimeout(Duration connectTimeout) Return a newClientHttpConnectorSettingsinstance with an updated connect timeout setting.withReadTimeout(Duration readTimeout) Return a newClientHttpConnectorSettingsinstance with an updated read timeout setting.withRedirects(HttpRedirects redirects) Return a newClientHttpConnectorSettingsinstance with an updated redirect setting.withSslBundle(SslBundle sslBundle) Return a newClientHttpConnectorSettingsinstance with an updated SSL bundle setting.withTimeouts(Duration connectTimeout, Duration readTimeout) Return a newClientHttpConnectorSettingsinstance with an updated connect and read timeout setting.
-
Constructor Details
-
ClientHttpConnectorSettings
public ClientHttpConnectorSettings(HttpRedirects redirects, Duration connectTimeout, Duration readTimeout, SslBundle sslBundle) Creates an instance of aClientHttpConnectorSettingsrecord class.- Parameters:
redirects- the value for theredirectsrecord componentconnectTimeout- the value for theconnectTimeoutrecord componentreadTimeout- the value for thereadTimeoutrecord componentsslBundle- the value for thesslBundlerecord component
-
-
Method Details
-
withConnectTimeout
Return a newClientHttpConnectorSettingsinstance with an updated connect timeout setting.- Parameters:
connectTimeout- the new connect timeout setting- Returns:
- a new
ClientHttpConnectorSettingsinstance
-
withReadTimeout
Return a newClientHttpConnectorSettingsinstance with an updated read timeout setting.- Parameters:
readTimeout- the new read timeout setting- Returns:
- a new
ClientHttpConnectorSettingsinstance
-
withTimeouts
Return a newClientHttpConnectorSettingsinstance with an updated connect and read timeout setting.- Parameters:
connectTimeout- the new connect timeout settingreadTimeout- the new read timeout setting- Returns:
- a new
ClientHttpConnectorSettingsinstance
-
withSslBundle
Return a newClientHttpConnectorSettingsinstance with an updated SSL bundle setting.- Parameters:
sslBundle- the new SSL bundle setting- Returns:
- a new
ClientHttpConnectorSettingsinstance
-
withRedirects
Return a newClientHttpConnectorSettingsinstance with an updated redirect setting.- Parameters:
redirects- the new redirects setting- Returns:
- a new
ClientHttpConnectorSettingsinstance
-
ofSslBundle
Return a newClientHttpConnectorSettingsusing defaults for all settings other than the provided SSL bundle.- Parameters:
sslBundle- the SSL bundle setting- Returns:
- a new
ClientHttpConnectorSettingsinstance
-
defaults
Use defaults for theClientHttpConnectorwhich can differ depending on the implementation.- Returns:
- default settings
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
Returns the value of theredirectsrecord component.- Returns:
- the value of the
redirectsrecord component
-
connectTimeout
Returns the value of theconnectTimeoutrecord component.- Returns:
- the value of the
connectTimeoutrecord component
-
readTimeout
Returns the value of thereadTimeoutrecord component.- Returns:
- the value of the
readTimeoutrecord component
-
sslBundle
Returns the value of thesslBundlerecord component.- Returns:
- the value of the
sslBundlerecord component
-