-
- All Superinterfaces:
AutoCloseable
,Closeable
,Http2DataWriter
,Http2FrameWriter
- All Known Implementing Classes:
CompressorHttp2ConnectionEncoder
,DecoratingHttp2ConnectionEncoder
,DefaultHttp2ConnectionEncoder
,StreamBufferingEncoder
@UnstableApi public interface Http2ConnectionEncoder extends Http2FrameWriter
Handler for outbound HTTP/2 traffic.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty5.handler.codec.http2.Http2FrameWriter
Http2FrameWriter.Configuration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Http2Connection
connection()
Provides direct access to the underlying connection.Http2RemoteFlowController
flowController()
Provides the remote flow controller for managing outbound traffic.Http2FrameWriter
frameWriter()
Provides direct access to the underlying frame writer object.void
lifecycleManager(Http2LifecycleManager lifecycleManager)
Sets the lifecycle manager.Http2Settings
pollSentSettings()
Gets the local settings on the top of the queue that has been sent but not ACKed.void
remoteSettings(Http2Settings settings)
Sets the settings for the remote endpoint of the HTTP/2 connection.Future<Void>
writeFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, Buffer payload)
Writes the given data to the internalHttp2FrameWriter
without performing any state checks on the connection/stream.-
Methods inherited from interface io.netty5.handler.codec.http2.Http2DataWriter
writeData
-
Methods inherited from interface io.netty5.handler.codec.http2.Http2FrameWriter
close, configuration, writeGoAway, writeHeaders, writeHeaders, writePing, writePriority, writePushPromise, writeRstStream, writeSettings, writeSettingsAck, writeWindowUpdate
-
-
-
-
Method Detail
-
lifecycleManager
void lifecycleManager(Http2LifecycleManager lifecycleManager)
Sets the lifecycle manager. Must be called as part of initialization before the encoder is used.
-
connection
Http2Connection connection()
Provides direct access to the underlying connection.
-
flowController
Http2RemoteFlowController flowController()
Provides the remote flow controller for managing outbound traffic.
-
frameWriter
Http2FrameWriter frameWriter()
Provides direct access to the underlying frame writer object.
-
pollSentSettings
Http2Settings pollSentSettings()
Gets the local settings on the top of the queue that has been sent but not ACKed. This may returnnull
.
-
remoteSettings
void remoteSettings(Http2Settings settings) throws Http2Exception
Sets the settings for the remote endpoint of the HTTP/2 connection.- Throws:
Http2Exception
-
writeFrame
Future<Void> writeFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, Buffer payload)
Writes the given data to the internalHttp2FrameWriter
without performing any state checks on the connection/stream.- Specified by:
writeFrame
in interfaceHttp2FrameWriter
- Parameters:
ctx
- the context to use for writing.frameType
- the frame type identifier.streamId
- the stream for which to send the frame.flags
- the flags to write for this frame.payload
- the payload to write for this frame. This will be released by this method.- Returns:
- the future for the write.
-
-