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 aResponseEncounteredrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theencounteredAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.headers()Returns the value of theheadersrecord component.Returns the value of therequestIdrecord component.byte[]Returns the value of theresponseBodyrecord component.Returns the value of theresponseIdrecord component.intstatus()Returns the value of thestatusrecord component.final StringtoString()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 aResponseEncounteredrecord class.- Parameters:
requestId- the value for therequestIdrecord componentresponseId- the value for theresponseIdrecord componentstatus- the value for thestatusrecord componentencounteredAt- the value for theencounteredAtrecord componentheaders- the value for theheadersrecord componentresponseBody- the value for theresponseBodyrecord 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 therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-
responseId
Returns the value of theresponseIdrecord component.- Returns:
- the value of the
responseIdrecord component
-
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
encounteredAt
Returns the value of theencounteredAtrecord component.- Returns:
- the value of the
encounteredAtrecord component
-
headers
Returns the value of theheadersrecord component.- Returns:
- the value of the
headersrecord component
-
responseBody
public byte[] responseBody()Returns the value of theresponseBodyrecord component.- Returns:
- the value of the
responseBodyrecord component
-