Class ReverseHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler
    Direct Known Subclasses:
    SnappyEncoder

    public class ReverseHandler
    extends io.netty.channel.ChannelDuplexHandler
    Reverse the polarity of the streams! Created by acurtis on 6/26/17.
    • Nested Class Summary

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

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

      Constructors 
      Constructor Description
      ReverseHandler​(io.netty.channel.ChannelHandler... handlers)  
      ReverseHandler​(java.util.function.Supplier<io.netty.channel.ChannelHandler[]> handlers)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelActive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelInactive​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)  
      void channelReadComplete​(io.netty.channel.ChannelHandlerContext ctx)  
      void channelUnregistered​(io.netty.channel.ChannelHandlerContext ctx)  
      void close​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)  
      void deregister​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)  
      void disconnect​(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise)  
      void flush​(io.netty.channel.ChannelHandlerContext ctx)  
      void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)  
      void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object evt)  
      void write​(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise)  
      • Methods inherited from class io.netty.channel.ChannelDuplexHandler

        bind, connect, read
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

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

        ensureNotSharable, handlerRemoved, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerRemoved
    • Constructor Detail

      • ReverseHandler

        public ReverseHandler​(@Nonnull
                              io.netty.channel.ChannelHandler... handlers)
      • ReverseHandler

        public ReverseHandler​(@Nonnull
                              java.util.function.Supplier<io.netty.channel.ChannelHandler[]> handlers)
    • Method Detail

      • disconnect

        public void disconnect​(io.netty.channel.ChannelHandlerContext ctx,
                               io.netty.channel.ChannelPromise promise)
                        throws java.lang.Exception
        Specified by:
        disconnect in interface io.netty.channel.ChannelOutboundHandler
        Overrides:
        disconnect in class io.netty.channel.ChannelDuplexHandler
        Throws:
        java.lang.Exception
      • close

        public void close​(io.netty.channel.ChannelHandlerContext ctx,
                          io.netty.channel.ChannelPromise promise)
                   throws java.lang.Exception
        Specified by:
        close in interface io.netty.channel.ChannelOutboundHandler
        Overrides:
        close in class io.netty.channel.ChannelDuplexHandler
        Throws:
        java.lang.Exception
      • deregister

        public void deregister​(io.netty.channel.ChannelHandlerContext ctx,
                               io.netty.channel.ChannelPromise promise)
                        throws java.lang.Exception
        Specified by:
        deregister in interface io.netty.channel.ChannelOutboundHandler
        Overrides:
        deregister in class io.netty.channel.ChannelDuplexHandler
        Throws:
        java.lang.Exception
      • write

        public void write​(io.netty.channel.ChannelHandlerContext ctx,
                          java.lang.Object msg,
                          io.netty.channel.ChannelPromise promise)
                   throws java.lang.Exception
        Specified by:
        write in interface io.netty.channel.ChannelOutboundHandler
        Overrides:
        write in class io.netty.channel.ChannelDuplexHandler
        Throws:
        java.lang.Exception
      • flush

        public void flush​(io.netty.channel.ChannelHandlerContext ctx)
                   throws java.lang.Exception
        Specified by:
        flush in interface io.netty.channel.ChannelOutboundHandler
        Overrides:
        flush in class io.netty.channel.ChannelDuplexHandler
        Throws:
        java.lang.Exception
      • channelUnregistered

        public void channelUnregistered​(io.netty.channel.ChannelHandlerContext ctx)
                                 throws java.lang.Exception
        Specified by:
        channelUnregistered in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelUnregistered in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • channelActive

        public void channelActive​(io.netty.channel.ChannelHandlerContext ctx)
                           throws java.lang.Exception
        Specified by:
        channelActive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • channelInactive

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

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                java.lang.Object msg)
                         throws java.lang.Exception
        Specified by:
        channelRead in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • channelReadComplete

        public void channelReadComplete​(io.netty.channel.ChannelHandlerContext ctx)
                                 throws java.lang.Exception
        Specified by:
        channelReadComplete in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelReadComplete in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • userEventTriggered

        public void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx,
                                       java.lang.Object evt)
                                throws java.lang.Exception
        Specified by:
        userEventTriggered in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        userEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • handlerAdded

        public void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)
                          throws java.lang.Exception
        Specified by:
        handlerAdded in interface io.netty.channel.ChannelHandler
        Overrides:
        handlerAdded in class io.netty.channel.ChannelHandlerAdapter
        Throws:
        java.lang.Exception