Class HttpReceiverOverHTTP2

    • Constructor Detail

      • HttpReceiverOverHTTP2

        public HttpReceiverOverHTTP2​(HttpChannel channel)
    • Method Detail

      • reset

        protected void reset()
        Description copied from class: HttpReceiver
        Resets the state of this HttpReceiver.

        Subclasses should override (but remember to call super) to reset their own state.

        Either this method or HttpReceiver.dispose() is called.

        Overrides:
        reset in class HttpReceiver
      • 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
      • 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()
      • onFailure

        public void onFailure​(Stream stream,
                              int error,
                              java.lang.String reason,
                              java.lang.Throwable failure,
                              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
        failure - the failure
        callback - the callback to complete when the failure has been handled