java.lang.Object
io.helidon.http.http2.Http2ConnectionWriter
- All Implemented Interfaces:
Http2StreamWriter
HTTP/2 connection writer.
-
Constructor Summary
ConstructorDescriptionHttp2ConnectionWriter
(SocketContext ctx, DataWriter writer, List<Http2FrameListener> sendFrameListeners) A new writer. -
Method Summary
Modifier and TypeMethodDescriptionvoid
updateHeaderTableSize
(long newSize) Update header table size.void
write
(Http2FrameData frame) Write a frame.void
writeData
(Http2FrameData frame, FlowControl.Outbound flowControl) Write a frame with flow control.int
writeHeaders
(Http2Headers headers, int streamId, Http2Flag.HeaderFlags flags, FlowControl.Outbound flowControl) Write headers with no (or streaming) entity.int
writeHeaders
(Http2Headers headers, int streamId, Http2Flag.HeaderFlags flags, Http2FrameData dataFrame, FlowControl.Outbound flowControl) Write headers and entity.
-
Constructor Details
-
Http2ConnectionWriter
public Http2ConnectionWriter(SocketContext ctx, DataWriter writer, List<Http2FrameListener> sendFrameListeners) A new writer.- Parameters:
ctx
- connection contextwriter
- data writersendFrameListeners
- send frame listeners
-
-
Method Details
-
write
Description copied from interface:Http2StreamWriter
Write a frame.- Specified by:
write
in interfaceHttp2StreamWriter
- Parameters:
frame
- frame to write
-
writeData
Description copied from interface:Http2StreamWriter
Write a frame with flow control.- Specified by:
writeData
in interfaceHttp2StreamWriter
- Parameters:
frame
- data frameflowControl
- outbound flow control
-
writeHeaders
public int writeHeaders(Http2Headers headers, int streamId, Http2Flag.HeaderFlags flags, FlowControl.Outbound flowControl) Description copied from interface:Http2StreamWriter
Write headers with no (or streaming) entity.- Specified by:
writeHeaders
in interfaceHttp2StreamWriter
- Parameters:
headers
- headersstreamId
- stream IDflags
- flags to useflowControl
- flow control- Returns:
- number of bytes written
-
writeHeaders
public int writeHeaders(Http2Headers headers, int streamId, Http2Flag.HeaderFlags flags, Http2FrameData dataFrame, FlowControl.Outbound flowControl) Description copied from interface:Http2StreamWriter
Write headers and entity.- Specified by:
writeHeaders
in interfaceHttp2StreamWriter
- Parameters:
headers
- headersstreamId
- stream IDflags
- header flagsdataFrame
- data frameflowControl
- flow control- Returns:
- number of bytes written
-
updateHeaderTableSize
Update header table size.- Parameters:
newSize
- in bytes- Throws:
InterruptedException
- in case we fail to lock on the stream
-