Package io.netty.handler.codec.http2
Interface Http2ConnectionEncoder
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,Http2DataWriter,Http2FrameWriter
- All Known Implementing Classes:
CompressorHttp2ConnectionEncoder,DecoratingHttp2ConnectionEncoder,DefaultHttp2ConnectionEncoder,StreamBufferingEncoder
public interface Http2ConnectionEncoder extends Http2FrameWriter
Handler for outbound HTTP/2 traffic.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.handler.codec.http2.Http2FrameWriter
Http2FrameWriter.Configuration
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Http2Connectionconnection()Provides direct access to the underlying connection.Http2RemoteFlowControllerflowController()Provides the remote flow controller for managing outbound traffic.Http2FrameWriterframeWriter()Provides direct access to the underlying frame writer object.voidlifecycleManager(Http2LifecycleManager lifecycleManager)Sets the lifecycle manager.Http2SettingspollSentSettings()Gets the local settings on the top of the queue that has been sent but not ACKed.voidremoteSettings(Http2Settings settings)Sets the settings for the remote endpoint of the HTTP/2 connection.ChannelFuturewriteFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf payload, ChannelPromise promise)Writes the given data to the internalHttp2FrameWriterwithout performing any state checks on the connection/stream.-
Methods inherited from interface io.netty.handler.codec.http2.Http2DataWriter
writeData
-
Methods inherited from interface io.netty.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
ChannelFuture writeFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf payload, ChannelPromise promise)
Writes the given data to the internalHttp2FrameWriterwithout performing any state checks on the connection/stream.- Specified by:
writeFramein 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.promise- the promise for the write.- Returns:
- the future for the write.
-
-