Class SimpleChannelUpstreamHandler

    • Constructor Detail

      • SimpleChannelUpstreamHandler

        public SimpleChannelUpstreamHandler()
    • Method Detail

      • handleUpstream

        public void handleUpstream​(ChannelHandlerContext ctx,
                                   ChannelEvent e)
                            throws java.lang.Exception
        Handles the specified upstream event. Down-casts the received upstream event into more meaningful sub-type event and calls an appropriate handler method with the down-casted event.
        Specified by:
        handleUpstream in interface ChannelUpstreamHandler
        Parameters:
        ctx - the context object for this handler
        e - the upstream event to process or intercept
        Throws:
        java.lang.Exception
      • messageReceived

        public void messageReceived​(ChannelHandlerContext ctx,
                                    MessageEvent e)
                             throws java.lang.Exception
        Invoked when a message object (e.g: ChannelBuffer) was received from a remote peer.
        Throws:
        java.lang.Exception
      • channelOpen

        public void channelOpen​(ChannelHandlerContext ctx,
                                ChannelStateEvent e)
                         throws java.lang.Exception
        Invoked when a Channel is open, but not bound nor connected.
        Be aware that this event is fired from within the I/O thread. You should never execute any heavy operation in there as it will block the dispatching to other workers!
        Throws:
        java.lang.Exception
      • channelBound

        public void channelBound​(ChannelHandlerContext ctx,
                                 ChannelStateEvent e)
                          throws java.lang.Exception
        Invoked when a Channel is open and bound to a local address, but not connected.
        Be aware that this event is fired from within the I/O thread. You should never execute any heavy operation in there as it will block the dispatching to other workers!
        Throws:
        java.lang.Exception
      • channelConnected

        public void channelConnected​(ChannelHandlerContext ctx,
                                     ChannelStateEvent e)
                              throws java.lang.Exception
        Invoked when a Channel is open, bound to a local address, and connected to a remote address.
        Be aware that this event is fired from within the I/O thread. You should never execute any heavy operation in there as it will block the dispatching to other workers!
        Throws:
        java.lang.Exception
      • channelDisconnected

        public void channelDisconnected​(ChannelHandlerContext ctx,
                                        ChannelStateEvent e)
                                 throws java.lang.Exception
        Invoked when a Channel was disconnected from its remote peer.
        Throws:
        java.lang.Exception
      • channelClosed

        public void channelClosed​(ChannelHandlerContext ctx,
                                  ChannelStateEvent e)
                           throws java.lang.Exception
        Invoked when a Channel was closed and all its related resources were released.
        Throws:
        java.lang.Exception