You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/01/04 17:30:08 UTC
[1/2] camel git commit: Add missing options in component docs
Repository: camel
Updated Branches:
refs/heads/master 80c1224b2 -> 4e1f3eec2
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/4e1f3eec
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4e1f3eec
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4e1f3eec
Branch: refs/heads/master
Commit: 4e1f3eec2131d01de9a7c4927c407666db85bfb6
Parents: 2db69a7
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jan 4 17:29:06 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jan 4 17:30:01 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/4e1f3eec/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 062eddd..0c0f6da 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/4e1f3eec/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 6f7a8da..e92ef0e 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/4e1f3eec/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/4e1f3eec/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");
[2/2] camel git commit: Polished
Posted by da...@apache.org.
Polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/2db69a7e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/2db69a7e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/2db69a7e
Branch: refs/heads/master
Commit: 2db69a7ec5824f20eab513eaa3c6cd4bedd64543
Parents: 80c1224
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jan 4 16:58:59 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jan 4 17:30:01 2016 +0100
----------------------------------------------------------------------
.../camel/component/netty/http/NettyHttpMethodRestrictTest.java | 2 +-
.../component/netty/http/NettyHttpStreamCacheFileResponseTest.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/2db69a7e/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpMethodRestrictTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpMethodRestrictTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpMethodRestrictTest.java
index d4955de..5ae0a05 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpMethodRestrictTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/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("netty-http://http://localhost:{{port}}/methodRestrict?httpMethodRestrict=POST").process(new Processor() {
+ from("netty-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/2db69a7e/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
index edfbf80..b88cffb 100644
--- a/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
+++ b/components/camel-netty-http/src/test/java/org/apache/camel/component/netty/http/NettyHttpStreamCacheFileResponseTest.java
@@ -64,7 +64,7 @@ public class NettyHttpStreamCacheFileResponseTest extends BaseNettyTest {
context.getStreamCachingStrategy().setSpoolThreshold(16);
context.setStreamCaching(true);
- from("netty-http://http://localhost:{{port}}/myserver")
+ from("netty-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");