camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-9559: camel-undertow - Allow to configure SSL on component level
Date Tue, 02 Feb 2016 09:27:24 GMT
Repository: camel
Updated Branches:
  refs/heads/master 070ed43e1 -> caf098d89


CAMEL-9559: camel-undertow - Allow to configure SSL on component level


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

Branch: refs/heads/master
Commit: caf098d8955fe1dbbbe5cdba53e598b3aad44eb0
Parents: 070ed43
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Feb 2 10:27:15 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Feb 2 10:27:15 2016 +0100

----------------------------------------------------------------------
 .../component/undertow/UndertowComponent.java   | 26 ++++++++++++++------
 .../component/undertow/UndertowEndpoint.java    |  6 ++---
 2 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/caf098d8/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
index e736aff..6ac84cb 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowComponent.java
@@ -47,6 +47,7 @@ import org.apache.camel.util.IntrospectionSupport;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.URISupport;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
+import org.apache.camel.util.jsse.SSLContextParameters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -58,6 +59,7 @@ public class UndertowComponent extends UriEndpointComponent implements RestConsu
 
     private UndertowHttpBinding undertowHttpBinding = new DefaultUndertowHttpBinding();
     private final Map<Integer, UndertowRegistry> serversRegistry = new HashMap<Integer,
UndertowRegistry>();
+    private SSLContextParameters sslContextParameters;
 
     public UndertowComponent() {
         super(UndertowEndpoint.class);
@@ -73,14 +75,10 @@ public class UndertowComponent extends UriEndpointComponent implements
RestConsu
 
         // create the endpoint first
         UndertowEndpoint endpoint = createEndpointInstance(endpointUri, this);
-
-        UndertowHttpBinding binding = resolveAndRemoveReferenceParameter(parameters, "undertowHttpBinding",
UndertowHttpBinding.class);
-        if (binding != null) {
-            endpoint.setUndertowHttpBinding(binding);
-        } else {
-            endpoint.setUndertowHttpBinding(undertowHttpBinding);
-        }
-
+        // set options from component
+        endpoint.setSslContextParameters(sslContextParameters);
+        endpoint.setUndertowHttpBinding(undertowHttpBinding);
+        // set options from parameters
         setProperties(endpoint, parameters);
         if (options != null) {
             endpoint.setOptions(options);
@@ -302,4 +300,16 @@ public class UndertowComponent extends UriEndpointComponent implements
RestConsu
         this.undertowHttpBinding = undertowHttpBinding;
     }
 
+    public SSLContextParameters getSslContextParameters() {
+        return sslContextParameters;
+    }
+
+    /**
+     * To configure security using SSLContextParameters
+     */
+    public void setSslContextParameters(SSLContextParameters sslContextParameters) {
+        this.sslContextParameters = sslContextParameters;
+    }
+
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/caf098d8/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
index 3f29d12..2466c15 100644
--- a/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
+++ b/components/camel-undertow/src/main/java/org/apache/camel/component/undertow/UndertowEndpoint.java
@@ -57,11 +57,11 @@ public class UndertowEndpoint extends DefaultEndpoint implements HeaderFilterStr
 
     @UriPath @Metadata(required = "true")
     private URI httpURI;
-    @UriParam
+    @UriParam(label = "advanced")
     private UndertowHttpBinding undertowHttpBinding;
-    @UriParam
+    @UriParam(label = "advanced")
     private HeaderFilterStrategy headerFilterStrategy;
-    @UriParam
+    @UriParam(label = "security")
     private SSLContextParameters sslContextParameters;
     @UriParam(label = "consumer")
     private String httpMethodRestrict;


Mime
View raw message