Class OrderedWriteChannelHandlerContext

java.lang.Object
software.amazon.awssdk.http.nio.netty.internal.utils.DelegatingChannelHandlerContext
software.amazon.awssdk.http.nio.netty.internal.utils.OrderedWriteChannelHandlerContext
All Implemented Interfaces:
io.netty.channel.ChannelHandlerContext, io.netty.channel.ChannelInboundInvoker, io.netty.channel.ChannelOutboundInvoker, io.netty.util.AttributeMap

public class OrderedWriteChannelHandlerContext extends DelegatingChannelHandlerContext
An implementation of ChannelHandlerContext that ensures all writes are performed in the order they are invoked. This works around https://github.com/netty/netty/issues/7783 where writes by an event loop 'skip ahead' of writes off of the event loop.
  • Method Details

    • wrap

      public static io.netty.channel.ChannelHandlerContext wrap(io.netty.channel.ChannelHandlerContext ctx)
    • write

      public io.netty.channel.ChannelFuture write(Object msg)
      Specified by:
      write in interface io.netty.channel.ChannelOutboundInvoker
      Overrides:
      write in class DelegatingChannelHandlerContext
    • write

      public io.netty.channel.ChannelFuture write(Object msg, io.netty.channel.ChannelPromise promise)
      Specified by:
      write in interface io.netty.channel.ChannelOutboundInvoker
      Overrides:
      write in class DelegatingChannelHandlerContext
    • writeAndFlush

      public io.netty.channel.ChannelFuture writeAndFlush(Object msg)
      Specified by:
      writeAndFlush in interface io.netty.channel.ChannelOutboundInvoker
      Overrides:
      writeAndFlush in class DelegatingChannelHandlerContext
    • writeAndFlush

      public io.netty.channel.ChannelFuture writeAndFlush(Object msg, io.netty.channel.ChannelPromise promise)
      Specified by:
      writeAndFlush in interface io.netty.channel.ChannelOutboundInvoker
      Overrides:
      writeAndFlush in class DelegatingChannelHandlerContext