CAMEL-7910 Netty {Client|Server}ChannelHandler need to pass the close and open 
event around


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b41b8d05
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b41b8d05
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b41b8d05

Branch: refs/remotes/origin/camel-2.13.x
Commit: b41b8d05adcb3bd3bac8fd8948bef128f646d42a
Parents: 9cf11bd
Author: Willem Jiang <willem.ji...@gmail.com>
Authored: Tue Oct 14 10:24:46 2014 +0800
Committer: Willem Jiang <willem.ji...@gmail.com>
Committed: Fri Oct 17 11:36:33 2014 +0800

----------------------------------------------------------------------
 .../camel/component/netty/handlers/ClientChannelHandler.java     | 4 ++++
 .../camel/component/netty/handlers/ServerChannelHandler.java     | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b41b8d05/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
index ea9d578..7a6d31f 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ClientChannelHandler.java
@@ -56,6 +56,8 @@ public class ClientChannelHandler extends 
SimpleChannelUpstreamHandler {
         }
         // to keep track of open sockets
         producer.getAllChannels().add(channelStateEvent.getChannel());
+        // make sure the event can be processed by other handlers
+        super.channelOpen(ctx, channelStateEvent);
     }
 
     @Override
@@ -119,6 +121,8 @@ public class ClientChannelHandler extends 
SimpleChannelUpstreamHandler {
             // signal callback
             callback.done(false);
         }
+        // make sure the event can be processed by other handlers
+        super.channelClosed(ctx, e);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/b41b8d05/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
----------------------------------------------------------------------
diff --git 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
index 6bafe7b..f966dee 100644
--- 
a/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
+++ 
b/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
@@ -56,6 +56,8 @@ public class ServerChannelHandler extends 
SimpleChannelUpstreamHandler {
         }
         // to keep track of open sockets
         consumer.getNettyServerBootstrapFactory().addChannel(e.getChannel());
+       // make sure the event can be processed by other handlers
+        super.channelOpen(ctx, e);
     }
 
     @Override
@@ -65,6 +67,8 @@ public class ServerChannelHandler extends 
SimpleChannelUpstreamHandler {
         }
         // to keep track of open sockets
         
consumer.getNettyServerBootstrapFactory().removeChannel(e.getChannel());
+        // make sure the event can be processed by other handlers
+        super.channelClosed(ctx, e);
     }
 
     @Override

Reply via email to