Class NettyStreamingChannel

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, StreamingChannel

    public class NettyStreamingChannel
    extends io.netty.channel.ChannelInboundHandlerAdapter
    implements StreamingChannel
    • Constructor Detail

      • NettyStreamingChannel

        public NettyStreamingChannel​(io.netty.channel.Channel channel,
                                     StreamingChannel.Kind kind)
    • Method Detail

      • peer

        public java.net.InetSocketAddress peer()
        Specified by:
        peer in interface StreamingChannel
      • close

        public io.netty.util.concurrent.Future<?> close()
        Specified by:
        close in interface StreamingChannel
      • onClose

        public void onClose​(java.lang.Runnable runOnClose)
        Specified by:
        onClose in interface StreamingChannel
      • channelRead

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                java.lang.Object message)
        Specified by:
        channelRead in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      • channelInactive

        public void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)
        Specified by:
        channelInactive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    java.lang.Throwable cause)
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelHandler
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
      • shutdown

        public static void shutdown()
        Shutdown for in-JVM tests. For any other usage, tracking of active inbound streaming handlers should be revisted first and in-JVM shutdown refactored with it. This does not prevent new inbound handlers being added after shutdown, nor is not thread-safe around new inbound handlers being opened during shutdown.
      • trackInboundHandlers

        public static void trackInboundHandlers()