Record Class ClientHttpRequestFactorySettings
java.lang.Object
java.lang.Record
org.springframework.boot.http.client.ClientHttpRequestFactorySettings
- 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 ClientHttpRequestFactorySettings(ClientHttpRequestFactorySettings.Redirects redirects, Duration connectTimeout, Duration readTimeout, SslBundle sslBundle)
extends Record
Settings that can be applied when creating a
ClientHttpRequestFactory
.- Since:
- 3.4.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Redirect strategies. -
Constructor Summary
ConstructorDescriptionClientHttpRequestFactorySettings
(ClientHttpRequestFactorySettings.Redirects redirects, Duration connectTimeout, Duration readTimeout, SslBundle sslBundle) Creates an instance of aClientHttpRequestFactorySettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconnectTimeout
record component.defaults()
Use defaults for theClientHttpRequestFactory
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.ofSslBundle
(SslBundle sslBundle) Return a newClientHttpRequestFactorySettings
using defaults for all settings other than the provided SSL bundle.Returns the value of thereadTimeout
record component.Returns the value of theredirects
record component.Returns the value of thesslBundle
record component.final String
toString()
Returns a string representation of this record class.withConnectTimeout
(Duration connectTimeout) Return a newClientHttpRequestFactorySettings
instance with an updated connect timeout setting.withReadTimeout
(Duration readTimeout) Return a newClientHttpRequestFactorySettings
instance with an updated read timeout setting.Return a newClientHttpRequestFactorySettings
instance with an updated redirect setting.withSslBundle
(SslBundle sslBundle) Return a newClientHttpRequestFactorySettings
instance with an updated SSL bundle setting.
-
Constructor Details
-
ClientHttpRequestFactorySettings
public ClientHttpRequestFactorySettings(ClientHttpRequestFactorySettings.Redirects redirects, Duration connectTimeout, Duration readTimeout, SslBundle sslBundle) Creates an instance of aClientHttpRequestFactorySettings
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 newClientHttpRequestFactorySettings
instance with an updated connect timeout setting.- Parameters:
connectTimeout
- the new connect timeout setting- Returns:
- a new
ClientHttpRequestFactorySettings
instance
-
withReadTimeout
Return a newClientHttpRequestFactorySettings
instance with an updated read timeout setting.- Parameters:
readTimeout
- the new read timeout setting- Returns:
- a new
ClientHttpRequestFactorySettings
instance
-
withSslBundle
Return a newClientHttpRequestFactorySettings
instance with an updated SSL bundle setting.- Parameters:
sslBundle
- the new SSL bundle setting- Returns:
- a new
ClientHttpRequestFactorySettings
instance
-
withRedirects
public ClientHttpRequestFactorySettings withRedirects(ClientHttpRequestFactorySettings.Redirects redirects) Return a newClientHttpRequestFactorySettings
instance with an updated redirect setting.- Parameters:
redirects
- the new redirects setting- Returns:
- a new
ClientHttpRequestFactorySettings
instance
-
ofSslBundle
Return a newClientHttpRequestFactorySettings
using defaults for all settings other than the provided SSL bundle.- Parameters:
sslBundle
- the SSL bundle setting- Returns:
- a new
ClientHttpRequestFactorySettings
instance
-
defaults
Use defaults for theClientHttpRequestFactory
which 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 theredirects
record component.- Returns:
- the value of the
redirects
record component
-
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
Returns the value of thesslBundle
record component.- Returns:
- the value of the
sslBundle
record component
-