Package io.vertx.core.http
Class StreamPriority
- java.lang.Object
-
- io.vertx.core.http.StreamPriority
-
public class StreamPriority extends Object
This class represents HTTP/2 stream priority defined in RFC 7540 clause 5.3
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_DEPENDENCYstatic booleanDEFAULT_EXCLUSIVEstatic shortDEFAULT_WEIGHT
-
Constructor Summary
Constructors Constructor Description StreamPriority()StreamPriority(StreamPriority other)StreamPriority(JsonObject json)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)intgetDependency()shortgetWeight()inthashCode()booleanisExclusive()StreamPrioritysetDependency(int dependency)Set the priority dependency value.StreamPrioritysetExclusive(boolean exclusive)Set the priority exclusive value.StreamPrioritysetWeight(short weight)Set the priority weight.JsonObjecttoJson()StringtoString()
-
-
-
Field Detail
-
DEFAULT_DEPENDENCY
public static final int DEFAULT_DEPENDENCY
- See Also:
- Constant Field Values
-
DEFAULT_WEIGHT
public static final short DEFAULT_WEIGHT
- See Also:
- Constant Field Values
-
DEFAULT_EXCLUSIVE
public static final boolean DEFAULT_EXCLUSIVE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StreamPriority
public StreamPriority()
-
StreamPriority
public StreamPriority(JsonObject json)
-
StreamPriority
public StreamPriority(StreamPriority other)
-
-
Method Detail
-
getWeight
public short getWeight()
- Returns:
- An integer value between
1and256representing a priority weight for the stream.
-
setWeight
public StreamPriority setWeight(short weight)
Set the priority weight.- Parameters:
weight- the new value- Returns:
- a reference to this, so the API can be used fluently
-
getDependency
public int getDependency()
- Returns:
- A stream identifier for the stream that this stream depends on.
-
setDependency
public StreamPriority setDependency(int dependency)
Set the priority dependency value.- Parameters:
dependency- the new value- Returns:
- a reference to this, so the API can be used fluently
-
isExclusive
public boolean isExclusive()
- Returns:
- A flag indicating that the stream dependency is exclusive.
-
setExclusive
public StreamPriority setExclusive(boolean exclusive)
Set the priority exclusive value.- Parameters:
exclusive- the new value- Returns:
- a reference to this, so the API can be used fluently
-
toJson
public JsonObject toJson()
-
-