Interface Session.Listener

All Known Subinterfaces:
Session.Client.Listener, Session.Server.Listener
All Known Implementing Classes:
SessionClientListener
Enclosing interface:
Session

public static interface Session.Listener

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

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    onDisconnect(Session session, long error, String reason)
    Callback method invoked when the underlying transport has been disconnected.
    default void
    onFailure(Session session, long error, String reason, Throwable failure)
    Callback method invoked when a failure has been detected for this session.
    default void
    onGoAway(Session session, GoAwayFrame frame)
    Callback method invoked when a GOAWAY frame has been received.
    default boolean
    Callback method invoked when the idle timeout has expired.
    default Map<Long,Long>
    onPreface(Session session)
    Callback method invoked just before the initial SETTINGS frame is sent to the remote peer, to gather the configuration settings that the local peer wants to send to the remote peer.
    default void
    onSettings(Session session, SettingsFrame frame)
    Callback method invoked when a SETTINGS frame has been received.
  • Method Details

    • onPreface

      default Map<Long,Long> onPreface(Session session)

      Callback method invoked just before the initial SETTINGS frame is sent to the remote peer, to gather the configuration settings that the local peer wants to send to the remote peer.

      Parameters:
      session - the session
      Returns:
      a (possibly empty or null) map containing configuration settings to send to the remote peer.
    • onSettings

      default void onSettings(Session session, SettingsFrame frame)

      Callback method invoked when a SETTINGS frame has been received.

      Parameters:
      session - the session
      frame - the SETTINGS frame received
    • onGoAway

      default void onGoAway(Session session, GoAwayFrame frame)

      Callback method invoked when a GOAWAY frame has been received.

      Parameters:
      session - the session
      frame - the GOAWAY frame received
    • onIdleTimeout

      default boolean onIdleTimeout(Session session)

      Callback method invoked when the idle timeout has expired.

      Parameters:
      session - the session
      Returns:
      true to confirm the idle timeout, false to ignore the idle timeout
    • onDisconnect

      default void onDisconnect(Session session, long error, String reason)

      Callback method invoked when the underlying transport has been disconnected.

      Parameters:
      session - the session
      error - the disconnect error
      reason - the disconnect reason
    • onFailure

      default void onFailure(Session session, long error, String reason, Throwable failure)

      Callback method invoked when a failure has been detected for this session.

      Parameters:
      session - the session
      error - the failure error
      reason - the failure reason
      failure - the failure