Class Session.Listener.Adapter
- All Implemented Interfaces:
Session.Listener
- Direct Known Subclasses:
ServerSessionListener.Adapter
- Enclosing interface:
- Session.Listener
Empty implementation of Stream.Listener
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.http2.api.Session.Listener
Session.Listener.Adapter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onClose
(Session session, GoAwayFrame frame) void
boolean
onIdleTimeout
(Session session) Callback method invoked when the idle timeout expired.onNewStream
(Stream stream, HeadersFrame frame) Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing an HTTP request.void
Callback method invoked when a PING frame has been received.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.http2.api.Session.Listener
onClose, onFailure, onGoAway
-
Constructor Details
-
Adapter
public Adapter()
-
-
Method Details
-
onPreface
Description copied from interface:Session.Listener
Callback method invoked:
- for clients, just before the preface is sent, to gather the SETTINGS configuration options the client wants to send to the server;
- for servers, just after having received the preface, to gather the SETTINGS configuration options the server wants to send to the client.
- Specified by:
onPreface
in interfaceSession.Listener
- Parameters:
session
- the session- Returns:
- a (possibly empty or null) map containing SETTINGS configuration options to send.
-
onNewStream
Description copied from interface:Session.Listener
Callback method invoked when a new stream is being created upon receiving a HEADERS frame representing an HTTP request.
Applications should implement this method to process HTTP requests, typically providing an 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 aStream.Listener
implementation that overridesStream.Listener.onData(Stream, DataFrame, Callback)
.- Specified by:
onNewStream
in interfaceSession.Listener
- Parameters:
stream
- the newly created streamframe
- the HEADERS frame received- Returns:
- a
Stream.Listener
that will be notified of stream events
-
onSettings
Description copied from interface:Session.Listener
Callback method invoked when a SETTINGS frame has been received.
- Specified by:
onSettings
in interfaceSession.Listener
- Parameters:
session
- the sessionframe
- the SETTINGS frame received
-
onPing
Description copied from interface:Session.Listener
Callback method invoked when a PING frame has been received.
- Specified by:
onPing
in interfaceSession.Listener
- Parameters:
session
- the sessionframe
- the PING frame received
-
onReset
Description copied from interface:Session.Listener
Callback method invoked when a RST_STREAM frame has been received for an unknown stream.
- Specified by:
onReset
in interfaceSession.Listener
- Parameters:
session
- the sessionframe
- the RST_STREAM frame received- See Also:
-
onClose
- Specified by:
onClose
in interfaceSession.Listener
-
onIdleTimeout
Description copied from interface:Session.Listener
Callback method invoked when the idle timeout expired.
- Specified by:
onIdleTimeout
in interfaceSession.Listener
- Parameters:
session
- the session- Returns:
- whether the session should be closed
-
onFailure
- Specified by:
onFailure
in interfaceSession.Listener
-