Record Class ClientHttpRequestFactorySettings
java.lang.Object
java.lang.Record
org.springframework.boot.web.client.ClientHttpRequestFactorySettings
- Record Components:
connectTimeout- the connect timeoutreadTimeout- the read timeoutsslBundle- the SSL bundle providing SSL configuration
public record ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, SslBundle sslBundle)
extends Record
Settings that can be applied when creating a
ClientHttpRequestFactory.- Since:
- 3.0.0
- Author:
- Andy Wilkinson, Phillip Webb, Scott Frederick
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ClientHttpRequestFactorySettingsUse defaults for theClientHttpRequestFactorywhich can differ depending on the implementation. -
Constructor Summary
ConstructorsConstructorDescriptionClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, Boolean bufferRequestBody) Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, Boolean bufferRequestBody, SslBundle sslBundle) Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, SslBundle sslBundle) Creates an instance of aClientHttpRequestFactorySettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1Returns the value of theconnectTimeoutrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thereadTimeoutrecord component.Returns the value of thesslBundlerecord component.final StringtoString()Returns a string representation of this record class.withBufferRequestBody(Boolean bufferRequestBody) Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1withConnectTimeout(Duration connectTimeout) Return a newClientHttpRequestFactorySettingsinstance with an updated connect timeout setting .withReadTimeout(Duration readTimeout) Return a newClientHttpRequestFactorySettingsinstance with an updated read timeout setting.withSslBundle(SslBundle sslBundle) Return a newClientHttpRequestFactorySettingsinstance with an updated SSL bundle setting.
-
Field Details
-
DEFAULTS
Use defaults for theClientHttpRequestFactorywhich can differ depending on the implementation.
-
-
Constructor Details
-
ClientHttpRequestFactorySettings
@Deprecated(since="3.2.0", forRemoval=true) public ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, Boolean bufferRequestBody) Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1Create a newClientHttpRequestFactorySettingsinstance.- Parameters:
connectTimeout- the connection timeoutreadTimeout- the read timeoutbufferRequestBody- if request body buffering is used
-
ClientHttpRequestFactorySettings
@Deprecated(since="3.2.0", forRemoval=true) public ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, Boolean bufferRequestBody, SslBundle sslBundle) Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1Create a newClientHttpRequestFactorySettingsinstance.- Parameters:
connectTimeout- the connection timeoutreadTimeout- the read timeoutbufferRequestBody- if request body buffering is usedsslBundle- the ssl bundle- Since:
- 3.1.0
-
ClientHttpRequestFactorySettings
public ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, SslBundle sslBundle) Creates an instance of aClientHttpRequestFactorySettingsrecord class.- Parameters:
connectTimeout- the value for theconnectTimeoutrecord componentreadTimeout- the value for thereadTimeoutrecord componentsslBundle- the value for thesslBundlerecord component
-
-
Method Details
-
withConnectTimeout
Return a newClientHttpRequestFactorySettingsinstance with an updated connect timeout setting .- Parameters:
connectTimeout- the new connect timeout setting- Returns:
- a new
ClientHttpRequestFactorySettingsinstance
-
withReadTimeout
Return a newClientHttpRequestFactorySettingsinstance with an updated read timeout setting.- Parameters:
readTimeout- the new read timeout setting- Returns:
- a new
ClientHttpRequestFactorySettingsinstance
-
withBufferRequestBody
@Deprecated(since="3.2.0", forRemoval=true) public ClientHttpRequestFactorySettings withBufferRequestBody(Boolean bufferRequestBody) Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1Has no effect as support for buffering has been removed in Spring Framework 6.1.- Parameters:
bufferRequestBody- the new buffer request body setting- Returns:
- a new
ClientHttpRequestFactorySettingsinstance
-
withSslBundle
Return a newClientHttpRequestFactorySettingsinstance with an updated SSL bundle setting.- Parameters:
sslBundle- the new SSL bundle setting- Returns:
- a new
ClientHttpRequestFactorySettingsinstance - Since:
- 3.1.0
-
bufferRequestBody
Deprecated, for removal: This API element is subject to removal in a future version.since 3.2.0 for removal in 3.4.0 as support for buffering has been removed in Spring Framework 6.1Returns whether request body buffering is used.- Returns:
- whether request body buffering is used
-
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). -
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
-