java.lang.Object
io.helidon.webclient.http2.Http2ClientStream
- All Implemented Interfaces:
- Http2Stream,- ReleasableResource
Represents an HTTP/2 client stream.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedHttp2ClientStream(Http2ClientConnection connection, Http2Settings serverSettings, SocketContext ctx, Http2StreamConfig http2StreamConfig, Http2ClientConfig http2ClientConfig, LockingStreamIdSequence streamIdSeq) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidcancel()Cancels this client stream.voidclose()Removes the stream from underlying connection.voidCloses the resource, we cannot use nameclose, as that would conflict withAutoCloseable, as we do not want to have a checked exception thrown.ctx()Returns the socket context associated with the stream.voiddata(Http2FrameHeader header, BufferData data, boolean endOfStream) Data frame.Outbound flow control of this stream.booleanDetermines if an entity is expected.voidheaders(Http2Headers headers, boolean endOfStream) Headers received.voidpriority(Http2Priority http2Priority) Priority.read()Reads a buffer data from the stream.Reads headers from this stream.Reads an HTTP2 frame from the stream.booleanrstStream(Http2RstStream rstStream) Close the stream.voidsendPing()Sends PING frame to server.intstreamId()Stream ID.State of this stream.trailers()Future that shall be completed once trailers are received.voidwindowUpdate(Http2WindowUpdate windowUpdate) Flow control window update.voidwriteData(BufferData entityBytes, boolean endOfStream) Writes a buffer data into the stream.voidwriteHeaders(Http2Headers http2Headers, boolean endOfStream) Writes HTTP2 headers to the stream.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.webclient.api.ReleasableResourcereleaseResource
- 
Constructor Details- 
Http2ClientStreamprotected Http2ClientStream(Http2ClientConnection connection, Http2Settings serverSettings, SocketContext ctx, Http2StreamConfig http2StreamConfig, Http2ClientConfig http2ClientConfig, LockingStreamIdSequence streamIdSeq) 
 
- 
- 
Method Details- 
streamIdpublic int streamId()Description copied from interface:Http2StreamStream ID.- Specified by:
- streamIdin interface- Http2Stream
- Returns:
- id of this stream
 
- 
streamStateDescription copied from interface:Http2StreamState of this stream.- Specified by:
- streamStatein interface- Http2Stream
- Returns:
- state
 
- 
headersDescription copied from interface:Http2StreamHeaders received.- Specified by:
- headersin interface- Http2Stream
- Parameters:
- headers- headers
- endOfStream- whether these headers are the last data that would be received
 
- 
rstStreamDescription copied from interface:Http2StreamClose the stream.- Specified by:
- rstStreamin interface- Http2Stream
- Parameters:
- rstStream- rst stream frame
- Returns:
- true if rapid reset(rst received before any data are sent)
 
- 
windowUpdateDescription copied from interface:Http2StreamFlow control window update.- Specified by:
- windowUpdatein interface- Http2Stream
- Parameters:
- windowUpdate- window update frame
 
- 
dataDescription copied from interface:Http2StreamData frame.- Specified by:
- datain interface- Http2Stream
- Parameters:
- header- frame header
- data- frame data
- endOfStream- whether this is the last data that would be received
 
- 
priorityDescription copied from interface:Http2StreamPriority.- Specified by:
- priorityin interface- Http2Stream
- Parameters:
- http2Priority- priority frame
 
- 
flowControlDescription copied from interface:Http2StreamOutbound flow control of this stream.- Specified by:
- flowControlin interface- Http2Stream
- Returns:
- flow control
 
- 
closeResourcepublic void closeResource()Description copied from interface:ReleasableResourceCloses the resource, we cannot use nameclose, as that would conflict withAutoCloseable, as we do not want to have a checked exception thrown.- Specified by:
- closeResourcein interface- ReleasableResource
 
- 
trailersFuture that shall be completed once trailers are received.- Returns:
- the completable future
 
- 
hasEntitypublic boolean hasEntity()Determines if an entity is expected. Set tofalsewhen an EOS flag is received.- Returns:
- trueif entity expected,- falseotherwise.
 
- 
cancelpublic void cancel()Cancels this client stream.
- 
closepublic void close()Removes the stream from underlying connection.
- 
readReads a buffer data from the stream.- Returns:
- the buffer data
 
- 
writeHeadersWrites HTTP2 headers to the stream.- Parameters:
- http2Headers- the headers
- endOfStream- end of stream marker
 
- 
writeDataWrites a buffer data into the stream.- Parameters:
- entityBytes- buffer data
- endOfStream- end of stream marker
 
- 
sendPingpublic void sendPing()Sends PING frame to server. Can be used to check if connection is healthy.
- 
readHeadersReads headers from this stream.- Returns:
- the headers
 
- 
ctxReturns the socket context associated with the stream.- Returns:
- the socket context
 
- 
readOneReads an HTTP2 frame from the stream.- Parameters:
- pollTimeout- timeout
- Returns:
- the data frame
 
 
-