Record Class ReportingEndpoints

java.lang.Object
java.lang.Record
io.micronaut.security.reporting.ReportingEndpoints
Record Components:
endpoints - endpoints to advertise

public record ReportingEndpoints(Collection<ReportingEndpoint> endpoints) extends Record
An unmodifiable collection of endpoints serialized as a Reporting-Endpoints header value.

The header uses the HTTP Structured Fields dictionary format. Endpoint entries are therefore separated by commas, names use the dictionary-key grammar, and URI references are serialized as quoted string values.

Endpoints are serialized in endpoint-name order to produce a deterministic header. Endpoint order has no effect on Reporting API processing.

Since:
5.4.0
  • Field Details

  • Constructor Details

    • ReportingEndpoints

      public ReportingEndpoints(Collection<ReportingEndpoint> endpoints)
      Creates an immutable endpoint collection in deterministic serialization order.
      Parameters:
      endpoints - endpoints to advertise
      Since:
      5.4.0
  • Method Details

    • toString

      public String toString()
      Serializes the endpoints as an HTTP Structured Fields dictionary.
      Specified by:
      toString in class Record
      Returns:
      the Reporting-Endpoints response-header value
    • 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.
    • endpoints

      public Collection<ReportingEndpoint> endpoints()
      Returns the value of the endpoints record component.
      Returns:
      the value of the endpoints record component