java.lang.Object
io.helidon.http.http2.Http2ConnectionWriter
- All Implemented Interfaces:
Http2StreamWriter
HTTP/2 connection writer.
-
Constructor Summary
ConstructorsConstructorDescriptionHttp2ConnectionWriter(SocketContext ctx, DataWriter writer, List<Http2FrameListener> sendFrameListeners) A new writer. -
Method Summary
Modifier and TypeMethodDescriptionvoidupdateHeaderTableSize(long newSize) Update header table size.voidwrite(Http2FrameData frame) Write a frame.voidwriteData(Http2FrameData frame, FlowControl.Outbound flowControl) Write a frame with flow control.intwriteHeaders(Http2Headers headers, int streamId, Http2Flag.HeaderFlags flags, FlowControl.Outbound flowControl) Write headers with no (or streaming) entity.intwriteHeaders(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:Http2StreamWriterWrite a frame.- Specified by:
writein interfaceHttp2StreamWriter- Parameters:
frame- frame to write
-
writeData
Description copied from interface:Http2StreamWriterWrite a frame with flow control.- Specified by:
writeDatain 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:Http2StreamWriterWrite headers with no (or streaming) entity.- Specified by:
writeHeadersin 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:Http2StreamWriterWrite headers and entity.- Specified by:
writeHeadersin 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
-