Record Class NetworkTransaction

java.lang.Object
java.lang.Record
com.shaft.capture.runtime.NetworkTransaction
Record Components:
transactionId - unique transaction identifier
method - HTTP method (GET, POST, etc.)
url - sanitized URL without sensitive query parameters or headers
statusCode - HTTP response status code
resourceKind - resource type (document, xhr, fetch, etc.)
timingMillis - request/response timing in milliseconds
bodyRefMetadata - safe body reference metadata (not the actual body)
correlatedUiSequence - related UI events in the capture sequence

public record NetworkTransaction(String transactionId, String method, String url, int statusCode, String resourceKind, long timingMillis, Map<String,Object> bodyRefMetadata, List<Integer> correlatedUiSequence) extends Record
Safe summary of a captured network transaction for API capture tools.
  • Constructor Details

    • NetworkTransaction

      public NetworkTransaction(String transactionId, String method, String url, int statusCode, String resourceKind, long timingMillis, Map<String,Object> bodyRefMetadata, List<Integer> correlatedUiSequence)
      Creates an immutable network transaction summary.
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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
    • method

      public String method()
      Returns the value of the method record component.
      Returns:
      the value of the method record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • statusCode

      public int statusCode()
      Returns the value of the statusCode record component.
      Returns:
      the value of the statusCode record component
    • resourceKind

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

      public long timingMillis()
      Returns the value of the timingMillis record component.
      Returns:
      the value of the timingMillis record component
    • bodyRefMetadata

      public Map<String,Object> bodyRefMetadata()
      Returns the value of the bodyRefMetadata record component.
      Returns:
      the value of the bodyRefMetadata record component
    • correlatedUiSequence

      public List<Integer> correlatedUiSequence()
      Returns the value of the correlatedUiSequence record component.
      Returns:
      the value of the correlatedUiSequence record component