Class Http2ClientStream

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

public class Http2ClientStream extends Object implements io.helidon.http.http2.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 Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Http2ClientStream(Http2ClientConnection connection, io.helidon.http.http2.Http2Settings serverSettings, io.helidon.common.socket.SocketContext ctx, Http2StreamConfig http2StreamConfig, Http2ClientConfig http2ClientConfig, LockingStreamIdSequence streamIdSeq)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancels this client stream.
    void
    Removes the stream from underlying connection.
    void
     
    io.helidon.common.socket.SocketContext
    ctx()
    Returns the socket context associated with the stream.
    void
    data(io.helidon.http.http2.Http2FrameHeader header, io.helidon.common.buffers.BufferData data, boolean endOfStream)
     
    io.helidon.http.http2.StreamFlowControl
     
    boolean
    Determines if an entity is expected.
    void
    headers(io.helidon.http.http2.Http2Headers headers, boolean endOfStream)
     
    void
    priority(io.helidon.http.http2.Http2Priority http2Priority)
     
    io.helidon.common.buffers.BufferData
    Reads a buffer data from the stream.
    io.helidon.http.http2.Http2Headers
    Reads headers from this stream.
    io.helidon.http.http2.Http2FrameData
    readOne(Duration pollTimeout)
    Reads an HTTP2 frame from the stream.
    boolean
    rstStream(io.helidon.http.http2.Http2RstStream rstStream)
     
    void
    Sends PING frame to server.
    int
     
    io.helidon.http.http2.Http2StreamState
     
    CompletableFuture<io.helidon.http.Headers>
    Future that shall be completed once trailers are received.
    void
    windowUpdate(io.helidon.http.http2.Http2WindowUpdate windowUpdate)
     
    void
    writeData(io.helidon.common.buffers.BufferData entityBytes, boolean endOfStream)
    Writes a buffer data into the stream.
    void
    writeHeaders(io.helidon.http.http2.Http2Headers http2Headers, boolean endOfStream)
    Writes HTTP2 headers to the stream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.helidon.webclient.api.ReleasableResource

    releaseResource
  • Constructor Details

  • Method Details

    • streamId

      public int streamId()
      Specified by:
      streamId in interface io.helidon.http.http2.Http2Stream
    • streamState

      public io.helidon.http.http2.Http2StreamState streamState()
      Specified by:
      streamState in interface io.helidon.http.http2.Http2Stream
    • headers

      public void headers(io.helidon.http.http2.Http2Headers headers, boolean endOfStream)
      Specified by:
      headers in interface io.helidon.http.http2.Http2Stream
    • rstStream

      public boolean rstStream(io.helidon.http.http2.Http2RstStream rstStream)
      Specified by:
      rstStream in interface io.helidon.http.http2.Http2Stream
    • windowUpdate

      public void windowUpdate(io.helidon.http.http2.Http2WindowUpdate windowUpdate)
      Specified by:
      windowUpdate in interface io.helidon.http.http2.Http2Stream
    • data

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

      public void priority(io.helidon.http.http2.Http2Priority http2Priority)
      Specified by:
      priority in interface io.helidon.http.http2.Http2Stream
    • flowControl

      public io.helidon.http.http2.StreamFlowControl flowControl()
      Specified by:
      flowControl in interface io.helidon.http.http2.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(io.helidon.http.http2.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 io.helidon.http.http2.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 io.helidon.http.http2.Http2FrameData readOne(Duration pollTimeout)
      Reads an HTTP2 frame from the stream.
      Parameters:
      pollTimeout - timeout
      Returns:
      the data frame