io.undertow.protocols.http2

## Class Http2PriorityTree

- java.lang.Object
- - io.undertow.protocols.http2.Http2PriorityTree

    public class Http2PriorityTree
    extends Object

A structure that represents HTTP2 priority information. Note that this structure is not thread safe, it is intended to be protected by an external lock

Author:
  Stuart Douglas

### Constructor Summary

Constructors
Constructor and Description
`Http2PriorityTree()` The maximum number of streams that we store priority information for

### Method Summary

All Methods Instance Methods Concrete Methods
`Comparator<Integer>` `comparator()` Creates a priority queue
`void` `priorityFrame(int streamId, int streamDependency, int weight, boolean exlusive)`
`void` `registerStream(int streamId, int dependency, int weighting, boolean exclusive)` Resisters a stream, with its dependency and dependent information
`void` `streamRemoved(int streamId)` Method that is invoked when a stream has been removed

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

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Http2PriorityTree

    public Http2PriorityTree()

The maximum number of streams that we store priority information for

### Method Detail

#### registerStream

    public void registerStream(int streamId,
                               int dependency,
                               int weighting,
                               boolean exclusive)

Resisters a stream, with its dependency and dependent information

Parameters:
  `streamId` - The stream id
  `dependency` - The stream this stream depends on, if no stream is specified this should be zero
  `weighting` - The weighting. If no weighting is specified this should be 16

#### streamRemoved

    public void streamRemoved(int streamId)

Method that is invoked when a stream has been removed

Parameters:
  `streamId` - id of the stream removed

#### comparator

    public Comparator<Integer> comparator()

Creates a priority queue

Returns:

#### priorityFrame

    public void priorityFrame(int streamId,
                              int streamDependency,
                              int weight,
                              boolean exlusive)