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()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 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` and `256` 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

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals​(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toJson

          public JsonObject toJson()

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`