Record Class Frame.PrioritySpec

java.lang.Object
java.lang.Record
io.github.mahmoudimus.http2.Frame.PrioritySpec
Record Components:
streamDependency - the dependency stream identifier, or 0 for the root
exclusive - whether the dependency is exclusive
weight - 1 to 256 (the wire value plus one)
Enclosing interface:
Frame

public static record Frame.PrioritySpec(int streamDependency, boolean exclusive, int weight) extends Record
The RFC 7540 priority signal carried by PRIORITY frames and HEADERS frames with the PRIORITY flag. RFC 9113 deprecates it; this codec parses it so the frame can be validated, and nothing acts on it.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PrioritySpec(int streamDependency, boolean exclusive, int weight)
    Creates a priority signal with a valid dependency and weight.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the exclusive record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the streamDependency record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the weight record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PrioritySpec

      public PrioritySpec(int streamDependency, boolean exclusive, int weight)
      Creates a priority signal with a valid dependency and weight.
      Parameters:
      streamDependency - the dependency stream identifier, or 0 for the root
      exclusive - whether the dependency is exclusive
      weight - the weight from 1 to 256
  • 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 '=='.
      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.
    • streamDependency

      public int streamDependency()
      Returns the value of the streamDependency record component.
      Returns:
      the value of the streamDependency record component
    • exclusive

      public boolean exclusive()
      Returns the value of the exclusive record component.
      Returns:
      the value of the exclusive record component
    • weight

      public int weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component