Repository: camel
Updated Branches:
  refs/heads/camel-2.16.x af14ebfce -> 9e91c334e
  refs/heads/master 6ad29b2ec -> a4aeefef5


Camel component docs


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

Branch: refs/heads/master
Commit: 1795520fef21791531d59f3b01d810160242803f
Parents: 6ad29b2
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Jan 5 17:58:50 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Jan 5 17:58:50 2016 +0100

----------------------------------------------------------------------
 .../camel/http/common/HttpCommonEndpoint.java   | 30 +++++++++++++-------
 .../apache/camel/http/common/HttpConsumer.java  |  2 +-
 .../apache/camel/http/common/HttpMessage.java   |  4 +--
 .../http/HttpReferenceParameterTest.java        |  4 +--
 4 files changed, 25 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/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 22b9017..2856c48 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
@@ -37,7 +37,7 @@ public abstract class HttpCommonEndpoint extends 
DefaultEndpoint implements Head
     @UriParam(description = "To use a custom HeaderFilterStrategy to filter 
header to and from Camel message.")
     HeaderFilterStrategy headerFilterStrategy = new HttpHeaderFilterStrategy();
     @UriParam(description = "To use a custom HttpBinding to control the 
mapping between Camel message and HttpClient.")
-    HttpBinding binding;
+    HttpBinding httpBinding;
     @UriParam(label = "producer", defaultValue = "true",
             description = "Option to disable throwing the 
HttpOperationFailedException in case of failed responses from the remote 
server."
                     + " This allows you to get all responses regardless of the 
HTTP status code.")
@@ -138,25 +138,35 @@ public abstract class HttpCommonEndpoint extends 
DefaultEndpoint implements Head
     // Properties
     //-------------------------------------------------------------------------
 
+    @Deprecated
     public HttpBinding getBinding() {
-        if (binding == null) {
+        return httpBinding;
+    }
+
+    @Deprecated
+    public void setBinding(HttpBinding httpBinding) {
+        setHttpBinding(httpBinding);
+    }
+
+    public HttpBinding getHttpBinding() {
+        if (httpBinding == null) {
             // create a new binding and use the options from this endpoint
-            binding = new DefaultHttpBinding();
-            binding.setHeaderFilterStrategy(getHeaderFilterStrategy());
-            binding.setTransferException(isTransferException());
+            httpBinding = new DefaultHttpBinding();
+            httpBinding.setHeaderFilterStrategy(getHeaderFilterStrategy());
+            httpBinding.setTransferException(isTransferException());
             if (getComponent() != null) {
-                
binding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject());
+                
httpBinding.setAllowJavaSerializedObject(getComponent().isAllowJavaSerializedObject());
             }
-            
binding.setEagerCheckContentAvailable(isEagerCheckContentAvailable());
+            
httpBinding.setEagerCheckContentAvailable(isEagerCheckContentAvailable());
         }
-        return binding;
+        return httpBinding;
     }
 
     /**
      * To use a custom HttpBinding to control the mapping between Camel 
message and HttpClient.
      */
-    public void setBinding(HttpBinding binding) {
-        this.binding = binding;
+    public void setHttpBinding(HttpBinding httpBinding) {
+        this.httpBinding = httpBinding;
     }
 
     public String getPath() {

http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
----------------------------------------------------------------------
diff --git 
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
 
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
index f389081..3a2da8e 100644
--- 
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
+++ 
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpConsumer.java
@@ -37,7 +37,7 @@ public class HttpConsumer extends DefaultConsumer implements 
SuspendableService
     }
 
     public HttpBinding getBinding() {
-        return getEndpoint().getBinding();
+        return getEndpoint().getHttpBinding();
     }
 
     public String getPath() {

http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
----------------------------------------------------------------------
diff --git 
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
 
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
index b2f4527..a56f886 100644
--- 
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
+++ 
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpMessage.java
@@ -49,7 +49,7 @@ public class HttpMessage extends DefaultMessage {
 
         // use binding to read the request allowing end users to use their
         // implementation of the binding
-        getEndpoint().getBinding().readRequest(request, this);
+        getEndpoint().getHttpBinding().readRequest(request, this);
     }
 
     public HttpServletRequest getRequest() {
@@ -63,7 +63,7 @@ public class HttpMessage extends DefaultMessage {
     @Override
     protected Object createBody() {
         try {
-            return getEndpoint().getBinding().parseBody(this);
+            return getEndpoint().getHttpBinding().parseBody(this);
         } catch (IOException e) {
             throw new RuntimeCamelException(e);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/1795520f/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
 
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
index 82ab548..ce88dfe 100644
--- 
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
+++ 
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpReferenceParameterTest.java
@@ -29,7 +29,7 @@ import org.junit.Test;
 public class HttpReferenceParameterTest extends CamelTestSupport {
 
     private static final String TEST_URI_1 = 
"http://localhost:8080?httpBinding=#customBinding&httpClientConfigurer=#customConfigurer";;
-    private static final String TEST_URI_2 = 
"http://localhost:8081?httpBinding=customBinding&httpClientConfigurer=customConfigurer";;
+    private static final String TEST_URI_2 = 
"http://localhost:8081?httpBinding=#customBinding&httpClientConfigurer=#customConfigurer";;
     
     private HttpEndpoint endpoint1;
     private HttpEndpoint endpoint2;
@@ -53,7 +53,7 @@ public class HttpReferenceParameterTest extends 
CamelTestSupport {
     }
 
     @Test
-    public void testHttpClientConfigurerRef() {
+    public void testHttpClientConfigurer() {
         assertSame(testConfigurer, endpoint1.getHttpClientConfigurer());
         assertSame(testConfigurer, endpoint2.getHttpClientConfigurer());
     }

Reply via email to