Record Class HarEntry

java.lang.Object
java.lang.Record
de.sstoehr.harreader.model.HarEntry

public record HarEntry(@Nullable String pageref, @Nullable ZonedDateTime startedDateTime, @Nullable Integer time, @Nonnull HarRequest request, @Nonnull HarResponse response, @Nonnull HarCache cache, @Nonnull HarTiming timings, @Nullable String serverIPAddress, @Nullable String connection, @Nullable String comment, @Nonnull Map<String,Object> additional) extends Record
Information about a single HTTP request.
See Also:
  • Constructor Details

    • HarEntry

      public HarEntry()
    • HarEntry

      public HarEntry(@Nullable String pageref, @Nullable ZonedDateTime startedDateTime, @Nullable Integer time, @Nullable HarRequest request, @Nullable HarResponse response, @Nullable HarCache cache, @Nullable HarTiming timings, @Nullable String serverIPAddress, @Nullable String connection, @Nullable String comment, @Nullable Map<String,Object> additional)
      Creates an instance of a HarEntry record class.
      Parameters:
      pageref - the value for the pageref record component
      startedDateTime - the value for the startedDateTime record component
      time - the value for the time record component
      request - the value for the request record component
      response - the value for the response record component
      cache - the value for the cache record component
      timings - the value for the timings record component
      serverIPAddress - the value for the serverIPAddress record component
      connection - the value for the connection record component
      comment - the value for the comment record component
      additional - the value for the additional record component
  • Method Details

    • additional

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

      public void setAdditionalField(String key, Object value)
    • 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.
    • pageref

      @Nullable public String pageref()
      Returns the value of the pageref record component.
      Returns:
      the value of the pageref record component
    • startedDateTime

      @Nullable public ZonedDateTime startedDateTime()
      Returns the value of the startedDateTime record component.
      Returns:
      the value of the startedDateTime record component
    • time

      @Nullable public Integer time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • request

      @Nonnull public HarRequest request()
      Returns the value of the request record component.
      Returns:
      the value of the request record component
    • response

      @Nonnull public HarResponse response()
      Returns the value of the response record component.
      Returns:
      the value of the response record component
    • cache

      @Nonnull public HarCache cache()
      Returns the value of the cache record component.
      Returns:
      the value of the cache record component
    • timings

      @Nonnull public HarTiming timings()
      Returns the value of the timings record component.
      Returns:
      the value of the timings record component
    • serverIPAddress

      @Nullable public String serverIPAddress()
      Returns the value of the serverIPAddress record component.
      Returns:
      the value of the serverIPAddress record component
    • connection

      @Nullable public String connection()
      Returns the value of the connection record component.
      Returns:
      the value of the connection record component
    • comment

      @Nullable public String comment()
      Returns the value of the comment record component.
      Returns:
      the value of the comment record component