Interface Session.Listener

All Known Subinterfaces:
AbstractSession.Listener
All Known Implementing Classes:
SessionContainer
Enclosing interface:
Session

public static interface Session.Listener

A Session.Listener is the passive counterpart of a Session and receives events happening on an QUIC connection.

See Also:
  • Method Details

    • onPrepare

      default TransportParameters onPrepare(Session session)

      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

      default void onOpen(Session session)

      Callback method invoked when a new session is opened.

      Parameters:
      session - the QUIC session
    • onTransportParameters

      default void onTransportParameters(Session session, TransportParameters parameters)

      Callback method invoked when the QUIC transport parameters are received.

      This event may not be emitted for all QUIC implementations.

      Parameters:
      session - the QUIC session
      parameters - the QUIC transport parameters
    • onNewStream

      default Stream.Listener onNewStream(Session session, Frame.WithStreamId frame)

      Callback method invoked when receiving a frame that causes the creation of a new stream.

      Parameters:
      session - the QUIC session
      frame - the frame that caused the creation of the stream
      Returns:
      a new Stream.Listener that handles events for the newly created stream
    • onMaxStreams

      default void onMaxStreams(Session session, MaxStreamsFrame frame)

      Callback method invoked when a MAX_STREAMS frame is received.

      Parameters:
      session - the QUIC session
      frame - the MAX_STREAMS frame
    • onPing

      default void onPing(Session session)

      Callback method invoked when a PING frame is received.

      Parameters:
      session - the QUIC session
    • onStreamsBlocked

      default void onStreamsBlocked(Session session, StreamsBlockedFrame frame)

      Callback method invoked when a STREAMS_BLOCKED frame is received.

      Parameters:
      session - the QUIC session
      frame - the STREAMS_BLOCKED frame
    • onMaxData

      default void onMaxData(Session session, MaxDataFrame frame)

      Callback method invoked when a MAX_DATA frame is received.

      Parameters:
      session - the QUIC session
      frame - the MAX_DATA frame
    • onDataBlocked

      default void onDataBlocked(Session session, DataBlockedFrame frame)

      Callback method invoked when a DATA_BLOCKED frame is received.

      Parameters:
      session - the QUIC session
      frame - the DATA_BLOCKED frame
    • onIdleTimeout

      default boolean onIdleTimeout(Session session, TimeoutException failure)

      Callback method invoked when the idle timeout expires.

      Parameters:
      session - the QUIC session
      failure - the idle timeout failure
      Returns:
      true to close the session, false to ignore the idle timeout
      See Also:
    • onClose

      default void onClose(Session session, ConnectionCloseFrame frame)

      Callback method invoked when a CONNECTION_CLOSE frame has been received.

      Parameters:
      session - the QUIC session
      frame - the CONNECTION_CLOSE frame
    • onDisconnect

      default void onDisconnect(Session session)

      Callback method invoked when the session has been disconnected.

      Parameters:
      session - the QUIC session