Interface Session.Listener
- All Known Subinterfaces:
AbstractSession.Listener
- All Known Implementing Classes:
SessionContainer
- Enclosing interface:
Session
A Session.Listener
is the passive counterpart of a Session
and
receives events happening on an QUIC connection.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Factory to createSession.Listener
instances. -
Method Summary
Modifier and TypeMethodDescriptiondefault void
onClose
(Session session, ConnectionCloseFrame frame) Callback method invoked when a CONNECTION_CLOSE frame has been received.default void
onDataBlocked
(Session session, DataBlockedFrame frame) Callback method invoked when a DATA_BLOCKED frame is received.default void
onDisconnect
(Session session) Callback method invoked when the session has been disconnected.default boolean
onIdleTimeout
(Session session, TimeoutException failure) Callback method invoked when the idle timeout expires.default void
onMaxData
(Session session, MaxDataFrame frame) Callback method invoked when a MAX_DATA frame is received.default void
onMaxStreams
(Session session, MaxStreamsFrame frame) Callback method invoked when a MAX_STREAMS frame is received.default Stream.Listener
onNewStream
(Session session, Frame.WithStreamId frame) Callback method invoked when receiving a frame that causes the creation of a new stream.default void
Callback method invoked when a new session is opened.default void
Callback method invoked when a PING frame is received.default TransportParameters
Callback method invoked to retrieve the QUIC transport parameters.default void
onStreamsBlocked
(Session session, StreamsBlockedFrame frame) Callback method invoked when a STREAMS_BLOCKED frame is received.default void
onTransportParameters
(Session session, TransportParameters parameters) Callback method invoked when the QUIC transport parameters are received.
-
Method Details
-
onPrepare
Callback method invoked to retrieve the QUIC transport parameters.
This event may not be emitted for all QUIC implementations.
- Parameters:
session
- the QUIC session- Returns:
- the QUIC transport parameters
-
onOpen
Callback method invoked when a new session is opened.
- Parameters:
session
- the QUIC session
-
onTransportParameters
Callback method invoked when the QUIC transport parameters are received.
This event may not be emitted for all QUIC implementations.
- Parameters:
session
- the QUIC sessionparameters
- the QUIC transport parameters
-
onNewStream
Callback method invoked when receiving a frame that causes the creation of a new stream.
- Parameters:
session
- the QUIC sessionframe
- the frame that caused the creation of the stream- Returns:
- a new
Stream.Listener
that handles events for the newly created stream
-
onMaxStreams
Callback method invoked when a MAX_STREAMS frame is received.
- Parameters:
session
- the QUIC sessionframe
- the MAX_STREAMS frame
-
onPing
Callback method invoked when a PING frame is received.
- Parameters:
session
- the QUIC session
-
onStreamsBlocked
Callback method invoked when a STREAMS_BLOCKED frame is received.
- Parameters:
session
- the QUIC sessionframe
- the STREAMS_BLOCKED frame
-
onMaxData
Callback method invoked when a MAX_DATA frame is received.
- Parameters:
session
- the QUIC sessionframe
- the MAX_DATA frame
-
onDataBlocked
Callback method invoked when a DATA_BLOCKED frame is received.
- Parameters:
session
- the QUIC sessionframe
- the DATA_BLOCKED frame
-
onIdleTimeout
Callback method invoked when the idle timeout expires.
- Parameters:
session
- the QUIC sessionfailure
- the idle timeout failure- Returns:
true
to close the session,false
to ignore the idle timeout- See Also:
-
onClose
Callback method invoked when a CONNECTION_CLOSE frame has been received.
- Parameters:
session
- the QUIC sessionframe
- the CONNECTION_CLOSE frame
-
onDisconnect
Callback method invoked when the session has been disconnected.
- Parameters:
session
- the QUIC session
-