camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/4] camel git commit: CAMEL-8038: Fixed @UriPath
Date Tue, 25 Nov 2014 07:22:09 GMT
CAMEL-8038: Fixed @UriPath


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

Branch: refs/heads/master
Commit: 41a6b93ebcbb2aa194fd62265d180fca1d8a8b45
Parents: caa5045
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Nov 25 08:17:33 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Nov 25 08:17:33 2014 +0100

----------------------------------------------------------------------
 .../netty/http/NettyHttpConfiguration.java      | 15 +++++++++++++
 .../component/netty/http/NettyHttpEndpoint.java |  8 +++++++
 .../tools/apt/EndpointAnnotationProcessor.java  | 23 ++++++++++++++++++++
 3 files changed, 46 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/41a6b93e/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
index 9c5dd4c..adfad5c 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpConfiguration.java
@@ -21,24 +21,39 @@ import java.util.List;
 
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.component.netty.NettyConfiguration;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
 import org.jboss.netty.channel.ChannelHandler;
 
 /**
  * Extended configuration for using HTTP with Netty.
  */
+@UriParams
 public class NettyHttpConfiguration extends NettyConfiguration {
 
+    @UriParam(defaultValue = "false")
     private boolean urlDecodeHeaders;
+    @UriParam(defaultValue = "true")
     private boolean mapHeaders = true;
+    @UriParam(defaultValue = "false")
     private boolean compression;
+    @UriParam(defaultValue = "true")
     private boolean throwExceptionOnFailure = true;
+    @UriParam(defaultValue = "false")
     private boolean transferException;
+    @UriParam(defaultValue = "false")
     private boolean matchOnUriPrefix;
+    @UriParam(defaultValue = "false")
     private boolean bridgeEndpoint;
+    @UriParam
     private String path;
+    @UriParam(defaultValue = "false")
     private boolean disableStreamCache;
+    @UriParam(defaultValue = "true")
     private boolean send503whenSuspended = true;
+    @UriParam(defaultValue = "" + 1024 * 1024)
     private int chunkedMaxContentLength = 1024 * 1024;
+    @UriParam(defaultValue = "true")
     private boolean chunked = true;
 
     public NettyHttpConfiguration() {

http://git-wip-us.apache.org/repos/asf/camel/blob/41a6b93e/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpEndpoint.java
b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpEndpoint.java
index 47e9163..4609b7c 100644
--- a/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpEndpoint.java
+++ b/components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/NettyHttpEndpoint.java
@@ -46,6 +46,8 @@ public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStra
     private NettyHttpBinding nettyHttpBinding;
     private HeaderFilterStrategy headerFilterStrategy;
     @UriParam
+    private NettyHttpConfiguration configuration;
+    @UriParam(defaultValue = "false")
     private boolean traceEnabled;
     @UriParam
     private String httpMethodRestrict;
@@ -124,6 +126,12 @@ public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStra
     }
 
     @Override
+    public void setConfiguration(NettyConfiguration configuration) {
+        super.setConfiguration(configuration);
+        this.configuration = (NettyHttpConfiguration) configuration;
+    }
+
+    @Override
     public NettyHttpConfiguration getConfiguration() {
         return (NettyHttpConfiguration) super.getConfiguration();
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/41a6b93e/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index 1aced82..7042ea0 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -822,6 +822,29 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         public Set<String> getEnums() {
             return enums;
         }
+
+        @Override
+        public boolean equals(Object o) {
+            if (this == o) {
+                return true;
+            }
+            if (o == null || getClass() != o.getClass()) {
+                return false;
+            }
+
+            EndpointPath that = (EndpointPath) o;
+
+            if (!name.equals(that.name)) {
+                return false;
+            }
+
+            return true;
+        }
+
+        @Override
+        public int hashCode() {
+            return name.hashCode();
+        }
     }
 
 }


Mime
View raw message