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:39:33 UTC
[11/19] camel git commit: CAMEL-8462 Removed the field of request
from HttpServerChannelHandler
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/f7c2e663
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f7c2e663
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f7c2e663
Branch: refs/heads/camel-2.14.x
Commit: f7c2e663f5ae1685a78d98f1934e1a879156ae73
Parents: e1d9b5c
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:38:00 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/f7c2e663/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 {