Interface Stream.Listener

All Known Implementing Classes:
HTTP2ServerConnectionFactory.HTTPServerSessionListener, Stream.Listener.Adapter
Enclosing interface:
Stream

public static interface Stream.Listener

A Stream.Listener is the passive counterpart of a Stream and receives events happening on an HTTP/2 stream.

HTTP/2 data is flow controlled - this means that only a finite number of data events are delivered, until the flow control window is exhausted.

Applications control the delivery of data events by requesting them via Stream.demand(long); the first event is always delivered, while subsequent events must be explicitly demanded.

Applications control the HTTP/2 flow control by completing the callback associated with data events - this allows the implementation to recycle the data buffer and eventually to enlarge the flow control window so that the sender can send more data.

See Also: