Interface Session.Listener

    • Method Detail

      • onPreface

        java.util.Map<java.lang.Integer,​java.lang.Integer> onPreface​(Session session)

        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.
        Parameters:
        session - the session
        Returns:
        a (possibly empty or null) map containing SETTINGS configuration options to send.
      • onSettings

        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
      • onPing

        void onPing​(Session session,
                    PingFrame frame)

        Callback method invoked when a PING frame has been received.

        Parameters:
        session - the session
        frame - the PING 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
      • onClose

        default void onClose​(Session session,
                             GoAwayFrame frame,
                             Callback callback)

        Callback method invoked when a GOAWAY frame caused the session to be closed.

        Parameters:
        session - the session
        frame - the GOAWAY frame that caused the session to be closed
        callback - the callback to notify of the GOAWAY processing
      • onIdleTimeout

        boolean onIdleTimeout​(Session session)

        Callback method invoked when the idle timeout expired.

        Parameters:
        session - the session
        Returns:
        whether the session should be closed
      • onFailure

        default void onFailure​(Session session,
                               java.lang.Throwable failure,
                               Callback callback)

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

        Parameters:
        session - the session
        failure - the failure
        callback - the callback to notify of failure processing
      • onFailure

        void onFailure​(Session session,
                       java.lang.Throwable failure)