Record Class Hooks.ResponseInfo
java.lang.Object
java.lang.Record
codes.grow.packages.betterstack.core.Hooks.ResponseInfo
- Record Components:
method- HTTP methodurl- redacted URLstatus- HTTP statusdurationMs- attempt duration in millisecondsattempt- attempt number starting at 1requestId- vendor request id when present
- Enclosing interface:
Hooks
-
Constructor Summary
ConstructorsConstructorDescriptionResponseInfo(String method, String url, int status, long durationMs, int attempt, Optional<String> requestId) Creates an instance of aResponseInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionintattempt()Returns the value of theattemptrecord component.longReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.method()Returns the value of themethodrecord component.Returns the value of therequestIdrecord component.intstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.
-
Constructor Details
-
ResponseInfo
public ResponseInfo(String method, String url, int status, long durationMs, int attempt, Optional<String> requestId) Creates an instance of aResponseInforecord class.- Parameters:
method- the value for themethodrecord componenturl- the value for theurlrecord componentstatus- the value for thestatusrecord componentdurationMs- the value for thedurationMsrecord componentattempt- the value for theattemptrecord componentrequestId- the value for therequestIdrecord 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 '=='. -
method
Returns the value of themethodrecord component.- Returns:
- the value of the
methodrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
status
public int status()Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
durationMs
public long durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-
attempt
public int attempt()Returns the value of theattemptrecord component.- Returns:
- the value of the
attemptrecord component
-
requestId
Returns the value of therequestIdrecord component.- Returns:
- the value of the
requestIdrecord component
-