Class DelegatingInboundHandler

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

    public class DelegatingInboundHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    Holds reference to ConnectionAdapterImpl and passes messages for further processing. Also informs on switch disconnection.
    Author:
    michal.polkorab
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx, Object msg)  
      void channelUnregistered​(io.netty.channel.ChannelHandlerContext ctx)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelReadComplete, channelRegistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Constructor Detail

      • DelegatingInboundHandler

        public DelegatingInboundHandler​(MessageConsumer connectionAdapter)
        Constructs class + creates and sets MessageConsumer.
        Parameters:
        connectionAdapter - reference for adapter communicating with upper layers outside library
    • Method Detail

      • channelRead

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                Object msg)
        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
      • channelUnregistered

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