camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/2] camel git commit: Add missing options in component docs
Date Mon, 04 Jan 2016 16:29:50 GMT
Add missing options in component docs


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

Branch: refs/heads/camel-2.16.x
Commit: bbbac65d5eb95dacd03b2e05b320eeccf33368d7
Parents: abec86f
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Jan 4 17:29:06 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Jan 4 17:29:38 2016 +0100

----------------------------------------------------------------------
 .../component/netty/http/NettyHttpEndpoint.java      | 15 +++++++++++++++
 .../component/netty4/http/NettyHttpEndpoint.java     | 15 +++++++++++++++
 .../netty4/http/NettyHttpMethodRestrictTest.java     |  2 +-
 .../http/NettyHttpStreamCacheFileResponseTest.java   |  2 +-
 4 files changed, 32 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bbbac65d/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 7c35ae2..7121d84 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
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.netty.http;
 
+import java.util.Map;
+
 import org.apache.camel.Consumer;
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
@@ -58,6 +60,8 @@ public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStra
     private NettySharedHttpServer nettySharedHttpServer;
     @UriParam(label = "consumer,security")
     private NettyHttpSecurityConfiguration securityConfiguration;
+    @UriParam(label = "consumer,security", prefix = "securityConfiguration.", multiValue
= true)
+    private Map<String, Object> securityOptions; // to include in component docs
 
     public NettyHttpEndpoint(String endpointUri, NettyHttpComponent component, NettyConfiguration
configuration) {
         super(endpointUri, component, configuration);
@@ -208,6 +212,17 @@ public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStra
         this.securityConfiguration = securityConfiguration;
     }
 
+    public Map<String, Object> getSecurityOptions() {
+        return securityOptions;
+    }
+
+    /**
+     * To configure NettyHttpSecurityConfiguration using key/value pairs from the map
+     */
+    public void setSecurityOptions(Map<String, Object> securityOptions) {
+        this.securityOptions = securityOptions;
+    }
+
     @Override
     protected void doStart() throws Exception {
         super.doStart();

http://git-wip-us.apache.org/repos/asf/camel/blob/bbbac65d/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
index a7da693..22e56db 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpEndpoint.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.netty4.http;
 
+import java.util.Map;
+
 import io.netty.channel.ChannelHandlerContext;
 import io.netty.handler.codec.http.FullHttpRequest;
 import org.apache.camel.Consumer;
@@ -57,6 +59,8 @@ public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStra
     private NettySharedHttpServer nettySharedHttpServer;
     @UriParam(label = "consumer,security")
     private NettyHttpSecurityConfiguration securityConfiguration;
+    @UriParam(label = "consumer,security", prefix = "securityConfiguration.", multiValue
= true)
+    private Map<String, Object> securityOptions; // to include in component docs
 
     public NettyHttpEndpoint(String endpointUri, NettyHttpComponent component, NettyConfiguration
configuration) {
         super(endpointUri, component, configuration);
@@ -206,6 +210,17 @@ public class NettyHttpEndpoint extends NettyEndpoint implements HeaderFilterStra
         this.securityConfiguration = securityConfiguration;
     }
 
+    public Map<String, Object> getSecurityOptions() {
+        return securityOptions;
+    }
+
+    /**
+     * To configure NettyHttpSecurityConfiguration using key/value pairs from the map
+     */
+    public void setSecurityOptions(Map<String, Object> securityOptions) {
+        this.securityOptions = securityOptions;
+    }
+
     @Override
     protected void doStart() throws Exception {
         super.doStart();

http://git-wip-us.apache.org/repos/asf/camel/blob/bbbac65d/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpMethodRestrictTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpMethodRestrictTest.java
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpMethodRestrictTest.java
index c955117..5441d21 100644
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpMethodRestrictTest.java
+++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpMethodRestrictTest.java
@@ -60,7 +60,7 @@ public class NettyHttpMethodRestrictTest extends BaseNettyTest {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() throws Exception {
-                from("netty4-http://http://localhost:{{port}}/methodRestrict?httpMethodRestrict=POST").process(new
Processor() {
+                from("netty4-http:http://localhost:{{port}}/methodRestrict?httpMethodRestrict=POST").process(new
Processor() {
                     public void process(Exchange exchange) throws Exception {
                         Message in = exchange.getIn();
                         String request = in.getBody(String.class);

http://git-wip-us.apache.org/repos/asf/camel/blob/bbbac65d/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpStreamCacheFileResponseTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpStreamCacheFileResponseTest.java
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpStreamCacheFileResponseTest.java
index 9fb7ea4..712be89 100644
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpStreamCacheFileResponseTest.java
+++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/NettyHttpStreamCacheFileResponseTest.java
@@ -64,7 +64,7 @@ public class NettyHttpStreamCacheFileResponseTest extends BaseNettyTest
{
                 context.getStreamCachingStrategy().setSpoolThreshold(16);
                 context.setStreamCaching(true);
 
-                from("netty4-http://http://localhost:{{port}}/myserver")
+                from("netty4-http:http://localhost:{{port}}/myserver")
                         // wrap the response in 2 input streams so it will force caching
to disk
                         .transform().constant(new BufferedInputStream(new ByteArrayInputStream(body2.getBytes())))
                         .to("log:reply");


Mime
View raw message