Record Class CaptureNetworkRecorder.RecordedTransaction

java.lang.Object
java.lang.Record
com.shaft.capture.network.CaptureNetworkRecorder.RecordedTransaction
Record Components:
transactionId - stable identifier correlating request and response evidence
resourceKind - fine-grained resource classification
request - sanitized outbound request evidence
response - sanitized inbound response evidence, or null when the exchange failed before a response was observed
timing - timing evidence; only the total wall-clock duration is populated
failureReason - safe failure reason, blank when the exchange completed
initiatorPageUrl - sanitized URL of the page that initiated the transaction
Enclosing class:
CaptureNetworkRecorder

public static record CaptureNetworkRecorder.RecordedTransaction(String transactionId, ResourceKind resourceKind, HttpRequestRecord request, HttpResponseRecord response, NetworkTiming timing, String failureReason, String initiatorPageUrl) extends Record
One redacted, replay-safe network transaction observed by this recorder, ready to be wrapped into a CaptureEvent.NetworkEvent once the caller assigns an EventContext (sequence, page, timestamp).
  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • transactionId

      public String transactionId()
      Returns the value of the transactionId record component.
      Returns:
      the value of the transactionId record component
    • resourceKind

      public ResourceKind resourceKind()
      Returns the value of the resourceKind record component.
      Returns:
      the value of the resourceKind record component
    • request

      public HttpRequestRecord request()
      Returns the value of the request record component.
      Returns:
      the value of the request record component
    • response

      public HttpResponseRecord response()
      Returns the value of the response record component.
      Returns:
      the value of the response record component
    • timing

      public NetworkTiming timing()
      Returns the value of the timing record component.
      Returns:
      the value of the timing record component
    • failureReason

      public String failureReason()
      Returns the value of the failureReason record component.
      Returns:
      the value of the failureReason record component
    • initiatorPageUrl

      public String initiatorPageUrl()
      Returns the value of the initiatorPageUrl record component.
      Returns:
      the value of the initiatorPageUrl record component