camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/4] git commit: CAMEL-7910 Netty {Client|Server}ChannelHandler need to pass the close and open event around
Date Tue, 14 Oct 2014 02:42:45 GMT
Repository: camel
Updated Branches:
  refs/heads/master a58a4fa43 -> 42d0a74e9


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/f0822493
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f0822493
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f0822493

Branch: refs/heads/master
Commit: f08224936f2262dc8ad32bdaa878d17181b3ed04
Parents: f90286c
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Tue Oct 14 10:24:46 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Tue Oct 14 10:41:53 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/f0822493/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/f0822493/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 4554730..afab4c9 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


Mime
View raw message