Interface Stream.Listener

    • Method Detail

      • onHeaders

        void onHeaders​(Stream stream,
                       HeadersFrame frame)

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

        Parameters:
        stream - the stream
        frame - the HEADERS frame received
      • onPush

        Stream.Listener onPush​(Stream stream,
                               PushPromiseFrame frame)

        Callback method invoked when a PUSH_PROMISE frame has been received.

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

        void onData​(Stream stream,
                    DataFrame frame,
                    org.eclipse.jetty.util.Callback callback)

        Callback method invoked when a DATA frame has been received.

        Parameters:
        stream - the stream
        frame - the DATA frame received
        callback - the callback to complete when the bytes of the DATA frame have been consumed
      • onIdleTimeout

        default boolean onIdleTimeout​(Stream stream,
                                      Throwable x)

        Callback method invoked when the stream exceeds its idle timeout.

        Parameters:
        stream - the stream
        x - the timeout failure
        Returns:
        true to reset the stream, false to ignore the idle timeout
        See Also:
        Stream.getIdleTimeout()