Class HTTP2ServerConnectionFactory.HTTPServerSessionListener

    • Constructor Detail

      • HTTPServerSessionListener

        public HTTPServerSessionListener​(Connector connector,
                                         EndPoint endPoint)
    • Method Detail

      • onPreface

        public java.util.Map<java.lang.Integer,​java.lang.Integer> onPreface​(Session session)
        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 interface Session.Listener
        Overrides:
        onPreface in class Session.Listener.Adapter
        Parameters:
        session - the session
        Returns:
        a (possibly empty or null) map containing SETTINGS configuration options to send.
      • onClose

        public void onClose​(Session session,
                            GoAwayFrame frame,
                            Callback callback)
        Description copied from interface: Session.Listener

        Callback method invoked when a GOAWAY frame has been received.

        Specified by:
        onClose in interface Session.Listener
        Parameters:
        session - the session
        frame - the GOAWAY frame received
        callback - the callback to notify of the GOAWAY processing
      • onFailure

        public void onFailure​(Session session,
                              java.lang.Throwable failure,
                              Callback callback)
        Description copied from interface: Session.Listener

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

        Specified by:
        onFailure in interface Session.Listener
        Parameters:
        session - the session
        failure - the failure
        callback - the callback to notify of failure processing
      • onHeaders

        public void onHeaders​(Stream stream,
                              HeadersFrame frame)
        Description copied from interface: Stream.Listener

        Callback method invoked when a HEADERS frame representing the HTTP response has been received.

        Specified by:
        onHeaders in interface Stream.Listener
        Parameters:
        stream - the stream
        frame - the HEADERS frame received
      • onPush

        public Stream.Listener onPush​(Stream stream,
                                      PushPromiseFrame frame)
        Description copied from interface: Stream.Listener

        Callback method invoked when a PUSH_PROMISE frame has been received.

        Specified by:
        onPush in interface Stream.Listener
        Parameters:
        stream - the stream
        frame - the PUSH_PROMISE frame received
        Returns:
        a Stream.Listener that will be notified of pushed stream events
      • onData

        public void onData​(Stream stream,
                           DataFrame frame,
                           Callback callback)
        Description copied from interface: Stream.Listener

        Callback method invoked when a DATA frame has been received.

        Specified by:
        onData in interface Stream.Listener
        Parameters:
        stream - the stream
        frame - the DATA frame received
        callback - the callback to complete when the bytes of the DATA frame have been consumed
      • onReset

        public void onReset​(Stream stream,
                            ResetFrame frame,
                            Callback callback)
        Description copied from interface: Stream.Listener

        Callback method invoked when a RST_STREAM frame has been received for this stream.

        Specified by:
        onReset in interface Stream.Listener
        Parameters:
        stream - the stream
        frame - the RST_FRAME received
        callback - the callback to complete when the reset has been handled
      • onFailure

        public void onFailure​(Stream stream,
                              int error,
                              java.lang.String reason,
                              Callback callback)
        Description copied from interface: Stream.Listener

        Callback method invoked when the stream failed.

        Specified by:
        onFailure in interface Stream.Listener
        Parameters:
        stream - the stream
        error - the error code
        reason - the error reason, or null
        callback - the callback to complete when the failure has been handled
      • onIdleTimeout

        public boolean onIdleTimeout​(Stream stream,
                                     java.lang.Throwable x)
        Description copied from interface: Stream.Listener

        Callback method invoked when the stream exceeds its idle timeout.

        Specified by:
        onIdleTimeout in interface Stream.Listener
        Parameters:
        stream - the stream
        x - the timeout failure
        Returns:
        true to reset the stream, false to ignore the idle timeout
        See Also:
        Stream.getIdleTimeout()