Class Http2ClientStream

java.lang.Object
io.helidon.webclient.http2.Http2ClientStream
All Implemented Interfaces:
Http2Stream, io.helidon.webclient.api.ReleasableResource

public class Http2ClientStream extends Object implements Http2Stream, io.helidon.webclient.api.ReleasableResource
Represents an HTTP2 client stream. This class is not intended to be used by applications, it is only public internally within Helidon.
  • Constructor Details

  • Method Details

    • streamId

      public int streamId()
      Specified by:
      streamId in interface Http2Stream
    • streamState

      public Http2StreamState streamState()
      Specified by:
      streamState in interface Http2Stream
    • headers

      public void headers(Http2Headers headers, boolean endOfStream)
      Specified by:
      headers in interface Http2Stream
    • rstStream

      public boolean rstStream(Http2RstStream rstStream)
      Specified by:
      rstStream in interface Http2Stream
    • windowUpdate

      public void windowUpdate(Http2WindowUpdate windowUpdate)
      Specified by:
      windowUpdate in interface Http2Stream
    • data

      public void data(Http2FrameHeader header, io.helidon.common.buffers.BufferData data, boolean endOfStream)
      Specified by:
      data in interface Http2Stream
    • priority

      public void priority(Http2Priority http2Priority)
      Specified by:
      priority in interface Http2Stream
    • flowControl

      public StreamFlowControl flowControl()
      Specified by:
      flowControl in interface Http2Stream
    • closeResource

      public void closeResource()
      Specified by:
      closeResource in interface io.helidon.webclient.api.ReleasableResource
    • trailers

      public CompletableFuture<io.helidon.http.Headers> trailers()
      Future that shall be completed once trailers are received.
      Returns:
      the completable future
    • hasEntity

      public boolean hasEntity()
      Determines if an entity is expected. Set to false when an EOS flag is received.
      Returns:
      true if entity expected, false otherwise.
    • cancel

      public void cancel()
      Cancels this client stream.
    • close

      public void close()
      Removes the stream from underlying connection.
    • read

      public io.helidon.common.buffers.BufferData read()
      Reads a buffer data from the stream.
      Returns:
      the buffer data
    • writeHeaders

      public void writeHeaders(Http2Headers http2Headers, boolean endOfStream)
      Writes HTTP2 headers to the stream.
      Parameters:
      http2Headers - the headers
      endOfStream - end of stream marker
    • writeData

      public void writeData(io.helidon.common.buffers.BufferData entityBytes, boolean endOfStream)
      Writes a buffer data into the stream.
      Parameters:
      entityBytes - buffer data
      endOfStream - end of stream marker
    • sendPing

      public void sendPing()
      Sends PING frame to server. Can be used to check if connection is healthy.
    • readHeaders

      public Http2Headers readHeaders()
      Reads headers from this stream.
      Returns:
      the headers
    • ctx

      public io.helidon.common.socket.SocketContext ctx()
      Returns the socket context associated with the stream.
      Returns:
      the socket context
    • readOne

      public Http2FrameData readOne(Duration pollTimeout)
      Reads an HTTP2 frame from the stream.
      Parameters:
      pollTimeout - timeout
      Returns:
      the data frame