ServerSessionListenerServerSessionListener.Adapter, Session.Listener.Adapterpublic static interface Session.Listener
A Session.Listener is the passive counterpart of a Session and
receives events happening on a HTTP/2 connection.
Session| Modifier and Type | Interface | Description |
|---|---|---|
static class |
Session.Listener.Adapter |
Empty implementation of
Stream.Listener. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
onClose(Session session,
GoAwayFrame frame) |
|
default void |
onClose(Session session,
GoAwayFrame frame,
Callback callback) |
Callback method invoked when a GOAWAY frame has been received.
|
void |
onFailure(Session session,
java.lang.Throwable failure) |
|
default void |
onFailure(Session session,
java.lang.Throwable failure,
Callback callback) |
Callback method invoked when a failure has been detected for this session.
|
boolean |
onIdleTimeout(Session session) |
Callback method invoked when the idle timeout expired.
|
Stream.Listener |
onNewStream(Stream stream,
HeadersFrame frame) |
Callback method invoked when a new stream is being created upon
receiving a HEADERS frame representing a HTTP request.
|
void |
onPing(Session session,
PingFrame frame) |
Callback method invoked when a PING frame has been received.
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
onPreface(Session session) |
Callback method invoked:
|
void |
onReset(Session session,
ResetFrame frame) |
Callback method invoked when a RST_STREAM frame has been received for an unknown stream.
|
void |
onSettings(Session session,
SettingsFrame frame) |
Callback method invoked when a SETTINGS frame has been received.
|
java.util.Map<java.lang.Integer,java.lang.Integer> onPreface(Session session)
Callback method invoked:
session - the sessionStream.Listener onNewStream(Stream stream, HeadersFrame frame)
Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing a HTTP request.
Applications should implement this method to process HTTP requests,
typically providing a HTTP response via
Stream.headers(HeadersFrame, Callback).
Applications can detect whether request DATA frames will be arriving
by testing HeadersFrame.isEndStream(). If the application is
interested in processing the DATA frames, it must return a
Stream.Listener implementation that overrides
Stream.Listener.onData(Stream, DataFrame, Callback).
stream - the newly created streamframe - the HEADERS frame receivedStream.Listener that will be notified of stream eventsvoid onSettings(Session session, SettingsFrame frame)
Callback method invoked when a SETTINGS frame has been received.
session - the sessionframe - the SETTINGS frame receivedvoid onPing(Session session, PingFrame frame)
Callback method invoked when a PING frame has been received.
session - the sessionframe - the PING frame receivedvoid onReset(Session session, ResetFrame frame)
Callback method invoked when a RST_STREAM frame has been received for an unknown stream.
session - the sessionframe - the RST_STREAM frame receivedStream.Listener.onReset(Stream, ResetFrame)default void onClose(Session session, GoAwayFrame frame, Callback callback)
Callback method invoked when a GOAWAY frame has been received.
session - the sessionframe - the GOAWAY frame receivedcallback - the callback to notify of the GOAWAY processingvoid onClose(Session session, GoAwayFrame frame)
boolean onIdleTimeout(Session session)
Callback method invoked when the idle timeout expired.
session - the sessiondefault void onFailure(Session session, java.lang.Throwable failure, Callback callback)
Callback method invoked when a failure has been detected for this session.
session - the sessionfailure - the failurecallback - the callback to notify of failure processingvoid onFailure(Session session, java.lang.Throwable failure)
Copyright © 1995–2018 Webtide. All rights reserved.