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 2015/03/09 11:06:49 UTC

[1/2] camel git commit: CAMEL-8462 Removed the field of request from HttpServerChannelHandler

Repository: camel
Updated Branches:
  refs/heads/master 4dfed552f -> c6710bb95


CAMEL-8462 Removed the field of request from HttpServerChannelHandler


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

Branch: refs/heads/master
Commit: c2e87ab65ff38b82aa442def28483799e8894a40
Parents: 4dfed55
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Mar 9 18:06:18 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Mar 9 18:06:18 2015 +0800

----------------------------------------------------------------------
 .../netty/http/handlers/HttpServerChannelHandler.java        | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c2e87ab6/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
index 8f483c5..e30ee27 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java
@@ -64,7 +64,6 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
     // use NettyHttpConsumer as logger to make it easier to read the logs as this is part of the consumer
     private static final Logger LOG = LoggerFactory.getLogger(NettyHttpConsumer.class);
     private final NettyHttpConsumer consumer;
-    private HttpRequest request;
 
     public HttpServerChannelHandler(NettyHttpConsumer consumer) {
         super(consumer);
@@ -77,8 +76,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
 
     @Override
     public void messageReceived(ChannelHandlerContext ctx, MessageEvent messageEvent) throws Exception {
-        // store request, as this channel handler is created per pipeline
-        request = (HttpRequest) messageEvent.getMessage();
+        HttpRequest request = (HttpRequest) messageEvent.getMessage();
 
         LOG.debug("Message received: {}", request);
 
@@ -292,7 +290,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent exceptionEvent) throws Exception {
-        
+
         // only close if we are still allowed to run
         if (consumer.isRunAllowed()) {
 
@@ -305,7 +303,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
             }
         }
     }
-    
+
 
     @Override
     protected Object getResponseBody(Exchange exchange) throws Exception {


[2/2] camel git commit: CAMEL-8462 Removed the field of request from HttpServerChannelHandler

Posted by ni...@apache.org.
CAMEL-8462 Removed the field of request from HttpServerChannelHandler


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

Branch: refs/heads/master
Commit: c6710bb954e40cc8bf4afa5bb2ee729251b9adab
Parents: c2e87ab
Author: Willem Jiang <wi...@gmail.com>
Authored: Mon Mar 9 18:06:32 2015 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Mon Mar 9 18:06:32 2015 +0800

----------------------------------------------------------------------
 .../netty4/http/handlers/HttpServerChannelHandler.java         | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c6710bb9/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
index b459057..18770b1 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/handlers/HttpServerChannelHandler.java
@@ -61,7 +61,6 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
     // use NettyHttpConsumer as logger to make it easier to read the logs as this is part of the consumer
     private static final Logger LOG = LoggerFactory.getLogger(NettyHttpConsumer.class);
     private final NettyHttpConsumer consumer;
-    private HttpRequest request;
 
     public HttpServerChannelHandler(NettyHttpConsumer consumer) {
         super(consumer);
@@ -74,8 +73,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
 
     @Override
     protected void channelRead0(ChannelHandlerContext ctx, Object msg) throws Exception {
-        // store request, as this channel handler is created per pipeline
-        request = (HttpRequest) msg;
+        HttpRequest request = (HttpRequest) msg;
 
         LOG.debug("Message received: {}", request);
 
@@ -281,7 +279,7 @@ public class HttpServerChannelHandler extends ServerChannelHandler {
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        
+
         // only close if we are still allowed to run
         if (consumer.isRunAllowed()) {