You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/10/17 05:40:22 UTC
[2/8] git commit: CAMEL-7910 Netty {Client|Server}ChannelHandler need
to pass the close and open event around
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/a7332105
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a7332105
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a7332105
Branch: refs/heads/camel-2.14.x
Commit: a73321054389e43014bcf9c559a99693b5e41ad3
Parents: 14ba1b3
Author: Willem Jiang <wi...@gmail.com>
Authored: Tue Oct 14 10:24:46 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Fri Oct 17 11:25:34 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/a7332105/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/a7332105/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