You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2015/10/09 20:28:37 UTC
[1/3] camel git commit: CAMEL-9208 - camel-netty4-http doesn't use
nettyHttpBinding from URI
Repository: camel
Updated Branches:
refs/heads/camel-2.15.x 44a07f956 -> ae9f2910f
refs/heads/camel-2.16.x c1e0f30c4 -> 0f09a8621
refs/heads/master 805ec4c32 -> 4b3bbf853
CAMEL-9208 - camel-netty4-http doesn't use nettyHttpBinding from URI
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4b3bbf85
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4b3bbf85
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4b3bbf85
Branch: refs/heads/master
Commit: 4b3bbf85312b7be0233184b38dba53e8a2cb110f
Parents: 805ec4c
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Fri Oct 9 15:56:51 2015 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Fri Oct 9 15:56:56 2015 -0230
----------------------------------------------------------------------
.../component/netty4/http/NettyHttpComponent.java | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/4b3bbf85/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
index 989d2ee..82f783d 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
@@ -105,16 +105,25 @@ public class NettyHttpComponent extends NettyComponent implements HeaderFilterSt
config.setPort(shared.getPort());
}
- // create the address uri which includes the remainder parameters (which is not configuration parameters for this component)
+ NettyHttpBinding bindingFromUri = resolveAndRemoveReferenceParameter(parameters, "nettyHttpBinding", NettyHttpBinding.class);
+
+ // create the address uri which includes the remainder parameters (which
+ // is not configuration parameters for this component)
URI u = new URI(UnsafeUriCharactersEncoder.encodeHttpURI(remaining));
-
+
String addressUri = URISupport.createRemainingURI(u, parameters).toString();
NettyHttpEndpoint answer = new NettyHttpEndpoint(addressUri, this, config);
- // must use a copy of the binding on the endpoint to avoid sharing same instance that can cause side-effects
+ // must use a copy of the binding on the endpoint to avoid sharing same
+ // instance that can cause side-effects
if (answer.getNettyHttpBinding() == null) {
- Object binding = getNettyHttpBinding();
+ Object binding = null;
+ if (bindingFromUri != null) {
+ binding = bindingFromUri;
+ } else {
+ binding = getNettyHttpBinding();
+ }
if (binding instanceof RestNettyHttpBinding) {
NettyHttpBinding copy = ((RestNettyHttpBinding) binding).copy();
answer.setNettyHttpBinding(copy);
[2/3] camel git commit: CAMEL-9208 - camel-netty4-http doesn't use
nettyHttpBinding from URI
Posted by ja...@apache.org.
CAMEL-9208 - camel-netty4-http doesn't use nettyHttpBinding from URI
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/0f09a862
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/0f09a862
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/0f09a862
Branch: refs/heads/camel-2.16.x
Commit: 0f09a8621d76f07e882cb73bab1aca4064395961
Parents: c1e0f30
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Fri Oct 9 15:56:51 2015 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Fri Oct 9 15:58:07 2015 -0230
----------------------------------------------------------------------
.../component/netty4/http/NettyHttpComponent.java | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/0f09a862/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
index 989d2ee..82f783d 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
@@ -105,16 +105,25 @@ public class NettyHttpComponent extends NettyComponent implements HeaderFilterSt
config.setPort(shared.getPort());
}
- // create the address uri which includes the remainder parameters (which is not configuration parameters for this component)
+ NettyHttpBinding bindingFromUri = resolveAndRemoveReferenceParameter(parameters, "nettyHttpBinding", NettyHttpBinding.class);
+
+ // create the address uri which includes the remainder parameters (which
+ // is not configuration parameters for this component)
URI u = new URI(UnsafeUriCharactersEncoder.encodeHttpURI(remaining));
-
+
String addressUri = URISupport.createRemainingURI(u, parameters).toString();
NettyHttpEndpoint answer = new NettyHttpEndpoint(addressUri, this, config);
- // must use a copy of the binding on the endpoint to avoid sharing same instance that can cause side-effects
+ // must use a copy of the binding on the endpoint to avoid sharing same
+ // instance that can cause side-effects
if (answer.getNettyHttpBinding() == null) {
- Object binding = getNettyHttpBinding();
+ Object binding = null;
+ if (bindingFromUri != null) {
+ binding = bindingFromUri;
+ } else {
+ binding = getNettyHttpBinding();
+ }
if (binding instanceof RestNettyHttpBinding) {
NettyHttpBinding copy = ((RestNettyHttpBinding) binding).copy();
answer.setNettyHttpBinding(copy);
[3/3] camel git commit: CAMEL-9208 - camel-netty4-http doesn't use
nettyHttpBinding from URI
Posted by ja...@apache.org.
CAMEL-9208 - camel-netty4-http doesn't use nettyHttpBinding from URI
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ae9f2910
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ae9f2910
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ae9f2910
Branch: refs/heads/camel-2.15.x
Commit: ae9f2910ff74f53cf6f7c209218d2ba45bebe58d
Parents: 44a07f9
Author: Jonathan Anstey <ja...@gmail.com>
Authored: Fri Oct 9 15:56:51 2015 -0230
Committer: Jonathan Anstey <ja...@gmail.com>
Committed: Fri Oct 9 15:58:21 2015 -0230
----------------------------------------------------------------------
.../component/netty4/http/NettyHttpComponent.java | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/ae9f2910/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
index 901ff14..87b6ed6 100644
--- a/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
+++ b/components/camel-netty4-http/src/main/java/org/apache/camel/component/netty4/http/NettyHttpComponent.java
@@ -104,16 +104,25 @@ public class NettyHttpComponent extends NettyComponent implements HeaderFilterSt
config.setPort(shared.getPort());
}
- // create the address uri which includes the remainder parameters (which is not configuration parameters for this component)
+ NettyHttpBinding bindingFromUri = resolveAndRemoveReferenceParameter(parameters, "nettyHttpBinding", NettyHttpBinding.class);
+
+ // create the address uri which includes the remainder parameters (which
+ // is not configuration parameters for this component)
URI u = new URI(UnsafeUriCharactersEncoder.encodeHttpURI(remaining));
-
+
String addressUri = URISupport.createRemainingURI(u, parameters).toString();
NettyHttpEndpoint answer = new NettyHttpEndpoint(addressUri, this, config);
- // must use a copy of the binding on the endpoint to avoid sharing same instance that can cause side-effects
+ // must use a copy of the binding on the endpoint to avoid sharing same
+ // instance that can cause side-effects
if (answer.getNettyHttpBinding() == null) {
- Object binding = getNettyHttpBinding();
+ Object binding = null;
+ if (bindingFromUri != null) {
+ binding = bindingFromUri;
+ } else {
+ binding = getNettyHttpBinding();
+ }
if (binding instanceof RestNettyHttpBinding) {
NettyHttpBinding copy = ((RestNettyHttpBinding) binding).copy();
answer.setNettyHttpBinding(copy);