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/08aa7da3 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/08aa7da3 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/08aa7da3 Branch: refs/heads/camel-2.15.x Commit: 08aa7da33a714ae83a41a536edcca0c00fc70d69 Parents: 6c61a24 Author: Willem Jiang <[email protected]> Authored: Mon Mar 9 18:06:18 2015 +0800 Committer: Willem Jiang <[email protected]> Committed: Mon Mar 9 18:36:27 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/08aa7da3/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 {
