Session.Listener

<p>A {@link Listener} is the passive counterpart of a {@link Session} and receives events happening on a HTTP/2 connection.</p>

@see Session

Members

Classes

Adapter
class Adapter

<p>Empty implementation of {@link Stream.Listener}.</p>

Functions

onClose
void onClose(Session session, GoAwayFrame frame, Callback callback)

<p>Callback method invoked when a GOAWAY frame has been received.</p>

onClose
void onClose(Session session, GoAwayFrame frame)
Undocumented in source.
onFailure
void onFailure(Session session, Exception failure, Callback callback)

<p>Callback method invoked when a failure has been detected for this session.</p>

onFailure
void onFailure(Session session, Exception failure)
Undocumented in source.
onIdleTimeout
bool onIdleTimeout(Session session)

<p>Callback method invoked when the idle timeout expired.</p> @param session the session @return whether the session should be closed

onNewStream
Stream.Listener onNewStream(Stream stream, HeadersFrame frame)

<p>Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing a HTTP request.</p> <p>Applications should implement this method to process HTTP requests, typically providing a HTTP response via {@link Stream#headers(HeadersFrame, Callback)}.</p> <p>Applications can detect whether request DATA frames will be arriving by testing {@link HeadersFrame#isEndStream()}. If the application is interested in processing the DATA frames, it must return a {@link Stream.Listener} implementation that overrides {@link Stream.Listener#onData(Stream, DataFrame, Callback)}.</p>

onPing
void onPing(Session session, PingFrame frame)

<p>Callback method invoked when a PING frame has been received.</p>

onPreface
Map!(int, int) onPreface(Session session)

<p>Callback method invoked:</p> <ul> <li>for clients, just before the preface is sent, to gather the SETTINGS configuration options the client wants to send to the server;</li> <li>for servers, just after having received the preface, to gather the SETTINGS configuration options the server wants to send to the client.</li> </ul>

onReset
void onReset(Session session, ResetFrame frame)

<p>Callback method invoked when a RST_STREAM frame has been received for an unknown stream.</p>

onSettings
void onSettings(Session session, SettingsFrame frame)

<p>Callback method invoked when a SETTINGS frame has been received.</p>

toString
string toString()
Undocumented in source.

Meta