Record Class ClientHttpRequestFactorySettings
java.lang.Object
java.lang.Record
org.springframework.boot.web.client.ClientHttpRequestFactorySettings
- Record Components:
- connectTimeout- the connect timeout
- readTimeout- the read timeout
- bufferRequestBody- if request body buffering is used
public record ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, Boolean bufferRequestBody)
extends Record
Settings that can be applied when creating a 
ClientHttpRequestFactory.- Since:
- 3.0.0
- Author:
- Andy Wilkinson, Phillip Webb
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ClientHttpRequestFactorySettingsUse defaults for theClientHttpRequestFactorywhich can differ depending on the implementation.
- 
Constructor SummaryConstructorsConstructorDescriptionClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, Boolean bufferRequestBody) Creates an instance of aClientHttpRequestFactorySettingsrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionReturns the value of thebufferRequestBodyrecord component.Returns 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.final StringtoString()Returns a string representation of this record class.withBufferRequestBody(Boolean bufferRequestBody) Return a newClientHttpRequestFactorySettingsinstance with an updated buffer request body setting.withConnectTimeout(Duration connectTimeout) Return a newClientHttpRequestFactorySettingsinstance with an updated connect timeout setting .withReadTimeout(Duration readTimeout) Return a newClientHttpRequestFactorySettingsinstance with an updated read timeout setting.
- 
Field Details- 
DEFAULTSUse defaults for theClientHttpRequestFactorywhich can differ depending on the implementation.
 
- 
- 
Constructor Details- 
ClientHttpRequestFactorySettingspublic ClientHttpRequestFactorySettings(Duration connectTimeout, Duration readTimeout, Boolean bufferRequestBody) Creates an instance of aClientHttpRequestFactorySettingsrecord class.- Parameters:
- connectTimeout- the value for the- connectTimeoutrecord component
- readTimeout- the value for the- readTimeoutrecord component
- bufferRequestBody- the value for the- bufferRequestBodyrecord component
 
 
- 
- 
Method Details- 
withConnectTimeoutReturn a newClientHttpRequestFactorySettingsinstance with an updated connect timeout setting .- Parameters:
- connectTimeout- the new connect timeout setting
- Returns:
- a new ClientHttpRequestFactorySettingsinstance
 
- 
withReadTimeoutReturn a newClientHttpRequestFactorySettingsinstance with an updated read timeout setting.- Parameters:
- readTimeout- the new read timeout setting
- Returns:
- a new ClientHttpRequestFactorySettingsinstance
 
- 
withBufferRequestBodyReturn a newClientHttpRequestFactorySettingsinstance with an updated buffer request body setting.- Parameters:
- bufferRequestBody- the new buffer request body setting
- Returns:
- a new ClientHttpRequestFactorySettingsinstance
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
connectTimeoutReturns the value of theconnectTimeoutrecord component.- Returns:
- the value of the connectTimeoutrecord component
 
- 
readTimeoutReturns the value of thereadTimeoutrecord component.- Returns:
- the value of the readTimeoutrecord component
 
- 
bufferRequestBodyReturns the value of thebufferRequestBodyrecord component.- Returns:
- the value of the bufferRequestBodyrecord component
 
 
-