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 int
DEFAULT_DEPENDENCY
static boolean
DEFAULT_EXCLUSIVE
static short
DEFAULT_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 boolean
equals(Object obj)
int
getDependency()
short
getWeight()
int
hashCode()
boolean
isExclusive()
StreamPriority
setDependency(int dependency)
Set the priority dependency value.StreamPriority
setExclusive(boolean exclusive)
Set the priority exclusive value.StreamPriority
setWeight(short weight)
Set the priority weight.JsonObject
toJson()
String
toString()
-
-
-
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
1
and256
representing 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()
-
-