java.lang.Object
io.helidon.nima.http2.webserver.Http2Stream
- All Implemented Interfaces:
Http2Stream,Runnable
Server HTTP/2 stream implementation.
-
Constructor Summary
ConstructorsConstructorDescriptionHttp2Stream(ConnectionContext ctx, HttpRouting routing, Http2Config http2Config, List<Http2SubProtocolSelector> subProviders, int streamId, Http2Settings serverSettings, Http2Settings clientSettings, Http2StreamWriter writer, ConnectionFlowControl connectionFlowControl) A new HTTP/2 server stream. -
Method Summary
Modifier and TypeMethodDescriptionvoidCheck if data can be received on this stream.voidCheck if headers can be received on this stream.voidCheck this stream is not closed.voiddata(Http2FrameHeader header, BufferData data) Data frame.Outbound flow control of this stream.voidheaders(Http2Headers headers, boolean endOfStream) Headers received.voidpriority(Http2Priority http2Priority) Priority.voidrstStream(Http2RstStream rstStream) Close the stream.voidrun()intstreamId()Stream ID.State of this stream.voidwindowUpdate(Http2WindowUpdate windowUpdate) Flow control window update.
-
Constructor Details
-
Http2Stream
public Http2Stream(ConnectionContext ctx, HttpRouting routing, Http2Config http2Config, List<Http2SubProtocolSelector> subProviders, int streamId, Http2Settings serverSettings, Http2Settings clientSettings, Http2StreamWriter writer, ConnectionFlowControl connectionFlowControl) A new HTTP/2 server stream.- Parameters:
ctx- connection contextrouting- HTTP routinghttp2Config- HTTP/2 configurationsubProviders-streamId- stream idserverSettings- server settingsclientSettings- client settingswriter- writerconnectionFlowControl- connection flow control
-
-
Method Details
-
checkNotClosed
Check this stream is not closed. This method is called from connection thread.- Throws:
Http2Exception- in case this stream is closed
-
checkDataReceivable
Check if data can be received on this stream. This method is called from connection thread.- Throws:
Http2Exception- in case data cannot be received
-
checkHeadersReceivable
Check if headers can be received on this stream. This method is called from connection thread.- Throws:
Http2Exception- in case headers cannot be received.
-
rstStream
Description copied from interface:Http2StreamClose the stream.- Specified by:
rstStreamin interfaceHttp2Stream- Parameters:
rstStream- rst stream frame
-
windowUpdate
Description copied from interface:Http2StreamFlow control window update.- Specified by:
windowUpdatein interfaceHttp2Stream- Parameters:
windowUpdate- window update frame
-
headers
Description copied from interface:Http2StreamHeaders received.- Specified by:
headersin interfaceHttp2Stream- Parameters:
headers- request headersendOfStream- whether these headers are the last data that would be received
-
data
Description copied from interface:Http2StreamData frame.- Specified by:
datain interfaceHttp2Stream- Parameters:
header- frame headerdata- frame data
-
priority
Description copied from interface:Http2StreamPriority.- Specified by:
priorityin interfaceHttp2Stream- Parameters:
http2Priority- priority frame
-
streamId
public int streamId()Description copied from interface:Http2StreamStream ID.- Specified by:
streamIdin interfaceHttp2Stream- Returns:
- id of this stream
-
streamState
Description copied from interface:Http2StreamState of this stream.- Specified by:
streamStatein interfaceHttp2Stream- Returns:
- state
-
flowControl
Description copied from interface:Http2StreamOutbound flow control of this stream.- Specified by:
flowControlin interfaceHttp2Stream- Returns:
- flow control
-
run
public void run()
-