Fixed CS
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e509811a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e509811a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e509811a Branch: refs/heads/master Commit: e509811ade654f433e8ea6125529a045e1292e95 Parents: 989886a Author: Andrea Cosentino <[email protected]> Authored: Wed May 18 09:00:51 2016 +0200 Committer: Andrea Cosentino <[email protected]> Committed: Wed May 18 09:00:51 2016 +0200 ---------------------------------------------------------------------- components/camel-ahc/src/main/docs/ahc.adoc | 5 ++++- .../org/apache/camel/component/ahc/AhcEndpoint.java | 12 ++++++------ .../apache/camel/http/common/HttpCommonEndpoint.java | 12 ++++++------ .../org/apache/camel/component/http/HttpProducer.java | 2 +- .../org/apache/camel/component/http4/HttpProducer.java | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/e509811a/components/camel-ahc/src/main/docs/ahc.adoc ---------------------------------------------------------------------- diff --git a/components/camel-ahc/src/main/docs/ahc.adoc b/components/camel-ahc/src/main/docs/ahc.adoc index 6ee94f4..a44a3b8 100644 --- a/components/camel-ahc/src/main/docs/ahc.adoc +++ b/components/camel-ahc/src/main/docs/ahc.adoc @@ -48,8 +48,9 @@ AhcEndpoint Options + // endpoint options: START -The AHC component supports 12 endpoint options which are listed below: +The AHC component supports 13 endpoint options which are listed below: {% raw %} [width="100%",cols="2s,1,1m,1m,5",options="header"] @@ -59,6 +60,7 @@ The AHC component supports 12 endpoint options which are listed below: | binding | producer | | AhcBinding | To use a custom AhcBinding which allows to control how to bind between AHC and Camel. | bridgeEndpoint | producer | false | boolean | If the option is true then the Exchange.HTTP_URI header is ignored and use the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let the AhcProducer send all the fault response back. | bufferSize | producer | 4096 | int | The initial in-memory buffer size used when transferring data between Camel and AHC Client. +| connectionClose | producer | false | boolean | Define if the Connection Close header has to be added to HTTP Request. This parameter is false by default | headerFilterStrategy | producer | | HeaderFilterStrategy | To use a custom HeaderFilterStrategy to filter header to and from Camel message. | throwExceptionOnFailure | producer | true | boolean | Option to disable throwing the AhcOperationFailedException in case of failed responses from the remote server. This allows you to get all responses regardless of the HTTP status code. | transferException | producer | false | boolean | If enabled and an Exchange failed processing on the consumer side and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type (for example using Jetty or Servlet Camel components). On the producer side the exception will be deserialized and thrown as is instead of the AhcOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. @@ -77,6 +79,7 @@ The AHC component supports 12 endpoint options which are listed below: + [[AHC-AhcComponentOptions]] AhcComponent Options ^^^^^^^^^^^^^^^^^^^^ http://git-wip-us.apache.org/repos/asf/camel/blob/e509811a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java index b488a73..bbb31d6 100644 --- a/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java +++ b/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/AhcEndpoint.java @@ -233,17 +233,17 @@ public class AhcEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade } public boolean isConnectionClose() { - return connectionClose; - } + return connectionClose; + } /** * Define if the Connection Close header has to be added to HTTP Request. This parameter is false by default */ - public void setConnectionClose(boolean connectionClose) { - this.connectionClose = connectionClose; - } + public void setConnectionClose(boolean connectionClose) { + this.connectionClose = connectionClose; + } - @Override + @Override protected void doStart() throws Exception { super.doStart(); if (client == null) { http://git-wip-us.apache.org/repos/asf/camel/blob/e509811a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java ---------------------------------------------------------------------- diff --git a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java index 0622e31..cb6e7ec 100644 --- a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java +++ b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java @@ -366,16 +366,16 @@ public abstract class HttpCommonEndpoint extends DefaultEndpoint implements Head return transferException; } - public boolean isConnectionClose() { - return connectionClose; - } + public boolean isConnectionClose() { + return connectionClose; + } /** * If this option is true, the producer will add a Connection Close header to HTTP Request */ - public void setConnectionClose(boolean connectionClose) { - this.connectionClose = connectionClose; - } + public void setConnectionClose(boolean connectionClose) { + this.connectionClose = connectionClose; + } /** * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized http://git-wip-us.apache.org/repos/asf/camel/blob/e509811a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java index 8e488c5..e855f92 100644 --- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java +++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java @@ -141,7 +141,7 @@ public class HttpProducer extends DefaultProducer { } if (getEndpoint().isConnectionClose()) { - method.addRequestHeader("Connection", "close"); + method.addRequestHeader("Connection", "close"); } // lets store the result in the output message. http://git-wip-us.apache.org/repos/asf/camel/blob/e509811a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java ---------------------------------------------------------------------- diff --git a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java index e10866d..dc60660 100644 --- a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java +++ b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java @@ -166,7 +166,7 @@ public class HttpProducer extends DefaultProducer { } if (getEndpoint().isConnectionClose()) { - httpRequest.addHeader("Connection", HTTP.CONN_CLOSE); + httpRequest.addHeader("Connection", HTTP.CONN_CLOSE); } // lets store the result in the output message.
