Record Class HttpClientResponse.Default
java.lang.Object
java.lang.Record
ru.tinkoff.kora.http.client.common.response.HttpClientResponse.Default
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpClientResponse
- Enclosing interface:
- HttpClientResponse
public static record HttpClientResponse.Default(int code, ru.tinkoff.kora.http.common.header.HttpHeaders headers, ru.tinkoff.kora.http.common.body.HttpBodyInput body, Runnable closer)
extends Record
implements HttpClientResponse
-
Nested Class Summary
Nested classes/interfaces inherited from interface ru.tinkoff.kora.http.client.common.response.HttpClientResponse
HttpClientResponse.Default -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionru.tinkoff.kora.http.common.body.HttpBodyInputbody()Returns the value of thebodyrecord component.voidclose()closer()Returns the value of thecloserrecord component.intcode()Returns the value of thecoderecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.ru.tinkoff.kora.http.common.header.HttpHeadersheaders()Returns the value of theheadersrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
Default
public Default(int code, ru.tinkoff.kora.http.common.header.HttpHeaders headers, ru.tinkoff.kora.http.common.body.HttpBodyInput body, Runnable closer) Creates an instance of aDefaultrecord class.- Parameters:
code- the value for thecoderecord componentheaders- the value for theheadersrecord componentbody- the value for thebodyrecord componentcloser- the value for thecloserrecord component
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceHttpClientResponse- Throws:
IOException
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
code
public int code()Returns the value of thecoderecord component.- Specified by:
codein interfaceHttpClientResponse- Returns:
- the value of the
coderecord component
-
headers
public ru.tinkoff.kora.http.common.header.HttpHeaders headers()Returns the value of theheadersrecord component.- Specified by:
headersin interfaceHttpClientResponse- Returns:
- the value of the
headersrecord component
-
body
public ru.tinkoff.kora.http.common.body.HttpBodyInput body()Returns the value of thebodyrecord component.- Specified by:
bodyin interfaceHttpClientResponse- Returns:
- the value of the
bodyrecord component
-
closer
Returns the value of thecloserrecord component.- Returns:
- the value of the
closerrecord component
-