Record Class Interactions.ResponseEncountered
java.lang.Object
java.lang.Record
org.diabetestechnology.drh.service.http.Interactions.ResponseEncountered
- Enclosing class:
Interactions
-
Constructor Summary
ConstructorsConstructorDescriptionResponseEncountered
(jakarta.servlet.http.HttpServletResponse response, Interactions.RequestEncountered requestEncountered, byte[] responseBody) ResponseEncountered
(UUID requestId, UUID responseId, int status, Instant encounteredAt, List<Interactions.Header> headers, byte[] responseBody) Creates an instance of aResponseEncountered
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theencounteredAt
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.headers()
Returns the value of theheaders
record component.Returns the value of therequestId
record component.byte[]
Returns the value of theresponseBody
record component.Returns the value of theresponseId
record component.int
status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ResponseEncountered
public ResponseEncountered(jakarta.servlet.http.HttpServletResponse response, Interactions.RequestEncountered requestEncountered, byte[] responseBody) -
ResponseEncountered
public ResponseEncountered(UUID requestId, UUID responseId, int status, Instant encounteredAt, List<Interactions.Header> headers, byte[] responseBody) Creates an instance of aResponseEncountered
record class.- Parameters:
requestId
- the value for therequestId
record componentresponseId
- the value for theresponseId
record componentstatus
- the value for thestatus
record componentencounteredAt
- the value for theencounteredAt
record componentheaders
- the value for theheaders
record componentresponseBody
- the value for theresponseBody
record component
-
-
Method Details
-
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 '=='. -
requestId
Returns the value of therequestId
record component.- Returns:
- the value of the
requestId
record component
-
responseId
Returns the value of theresponseId
record component.- Returns:
- the value of the
responseId
record component
-
status
public int status()Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
encounteredAt
Returns the value of theencounteredAt
record component.- Returns:
- the value of the
encounteredAt
record component
-
headers
Returns the value of theheaders
record component.- Returns:
- the value of the
headers
record component
-
responseBody
public byte[] responseBody()Returns the value of theresponseBody
record component.- Returns:
- the value of the
responseBody
record component
-