Interface PushObserver

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean onData​(int streamId, BufferedSource source, int byteCount, boolean last)
      A chunk of response data corresponding to a pushed request.
      boolean onHeaders​(int streamId, List<Header> responseHeaders, boolean last)
      The response headers corresponding to a pushed request.
      boolean onRequest​(int streamId, List<Header> requestHeaders)
      Describes the request that the server intends to push a response for.
      void onReset​(int streamId, ErrorCode errorCode)
      Indicates the reason why this stream was canceled.
    • Method Detail

      • onRequest

        boolean onRequest​(int streamId,
                          List<Header> requestHeaders)
        Describes the request that the server intends to push a response for.
        Parameters:
        streamId - server-initiated stream ID: an even number.
        requestHeaders - minimally includes :method, :scheme, :authority, and (@code :path}.
      • onHeaders

        boolean onHeaders​(int streamId,
                          List<Header> responseHeaders,
                          boolean last)
        The response headers corresponding to a pushed request. When last is true, there are no data frames to follow.
        Parameters:
        streamId - server-initiated stream ID: an even number.
        responseHeaders - minimally includes :status.
        last - when true, there is no response data.
      • onData

        boolean onData​(int streamId,
                       BufferedSource source,
                       int byteCount,
                       boolean last)
                throws IOException
        A chunk of response data corresponding to a pushed request. This data must either be read or skipped.
        Parameters:
        streamId - server-initiated stream ID: an even number.
        source - location of data corresponding with this stream ID.
        byteCount - number of bytes to read or skip from the source.
        last - when true, there are no data frames to follow.
        Throws:
        IOException
      • onReset

        void onReset​(int streamId,
                     ErrorCode errorCode)
        Indicates the reason why this stream was canceled.