Package io.github.mahmoudimus.http2
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 rootexclusive- whether the dependency is exclusiveweight- 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
ConstructorsConstructorDescriptionPrioritySpec(int streamDependency, boolean exclusive, int weight) Creates a priority signal with a valid dependency and weight. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexclusiverecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of thestreamDependencyrecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
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 rootexclusive- whether the dependency is exclusiveweight- the weight from 1 to 256
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
streamDependency
public int streamDependency()Returns the value of thestreamDependencyrecord component.- Returns:
- the value of the
streamDependencyrecord component
-
exclusive
public boolean exclusive()Returns the value of theexclusiverecord component.- Returns:
- the value of the
exclusiverecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-