Record Class ManagedQualifier

java.lang.Object
java.lang.Record
org.j7m.middleware.application.api.ManagedQualifier
Record Components:
annotationType - fully qualified binary annotation type name
members - canonical member name to value mapping, at most64 entries

public record ManagedQualifier(String annotationType, Map<String,String> members) extends Record
Exact immutable qualifier identity produced by a generated component index. Member values use value(Object), including annotation defaults. Qualifier values are selection data and must not be printed as diagnostic labels or used to carry credentials.
  • Constructor Details

    • ManagedQualifier

      public ManagedQualifier(String annotationType, Map<String,String> members)
      Validates and copies a bounded canonical qualifier.
      Parameters:
      annotationType - nonblank type name, at most512 characters
      members - at most64 nonnull member names/canonical values
      Throws:
      IllegalArgumentException - for invalid bounds
  • Method Details

    • value

      public static String value(Object member)
      Encodes one supported annotation member without compiler/runtime formatting differences. Supported values are String, boxed primitives, Character, Enum, Class and arrays thereof. Nested annotation instances are unsupported. Arrays have at most64 elements and depth8; the complete canonical value has at most8192 characters. Length framing avoids collisions.
      Parameters:
      member - supported nonnull annotation member value
      Returns:
      stable canonical representation, including the member's type
      Throws:
      IllegalArgumentException - for unsupported values or excessive bounds
    • fingerprint

      public static String fingerprint(List<ManagedQualifier> qualifiers)
      Hashes an exact normalized qualifier set using sorted, length-framed UTF16 code units. Host exports and binding requests share this representation; no qualifier values are exposed in the resulting routing fingerprint. A digest is compatibility data, not authentication.
      Parameters:
      qualifiers - at most16 unique qualifier types
      Returns:
      lowercase SHA256 fingerprint, including the empty set
      Throws:
      IllegalArgumentException - for invalid qualifier sets
    • 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.
    • annotationType

      public String annotationType()
      Returns the value of the annotationType record component.
      Returns:
      the value of the annotationType record component
    • members

      public Map<String,String> members()
      Returns the value of the members record component.
      Returns:
      the value of the members record component