camel git commit: CAMEL-11046 camel-undertow - Allow to consume f...

2017-04-12 Thread zregvart
Repository: camel
Updated Branches:
  refs/heads/master a313e4213 -> a2d861e1d


CAMEL-11046 camel-undertow - Allow to consume f...

...rom root path more without ending slash

Modifies the given `httpURI` passed via the setter `setHttpURI`, if it
does not contain path, path is explicitly set to `/`, so
`http://0.0.0.0:8080` becomes `http://0.0.0.0:8080/`.


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

Branch: refs/heads/master
Commit: a2d861e1d080691edf1d81485fb881f0699626d5
Parents: a313e42
Author: Zoran Regvart 
Authored: Wed Apr 12 22:34:21 2017 +0200
Committer: Zoran Regvart 
Committed: Wed Apr 12 22:34:21 2017 +0200

--
 .../component/undertow/UndertowEndpoint.java| 12 -
 .../undertow/UndertowEndpointTest.java  | 52 
 2 files changed, 63 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a2d861e1/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 6e59caf..2b4e75a 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
@@ -38,6 +38,7 @@ import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
+import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -148,7 +149,16 @@ public class UndertowEndpoint extends DefaultEndpoint 
implements AsyncEndpoint,
  * The url of the HTTP endpoint to use.
  */
 public void setHttpURI(URI httpURI) {
-this.httpURI = httpURI;
+if (ObjectHelper.isEmpty(httpURI.getPath())) {
+try {
+this.httpURI = new URI(httpURI.getScheme(), 
httpURI.getUserInfo(), httpURI.getHost(), httpURI.getPort(),
+"/", httpURI.getQuery(), httpURI.getFragment());
+} catch (URISyntaxException e) {
+throw new IllegalArgumentException(e);
+}
+} else {
+this.httpURI = httpURI;
+}
 }
 
 public String getHttpMethodRestrict() {

http://git-wip-us.apache.org/repos/asf/camel/blob/a2d861e1/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowEndpointTest.java
--
diff --git 
a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowEndpointTest.java
 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowEndpointTest.java
new file mode 100644
index 000..4562742
--- /dev/null
+++ 
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/UndertowEndpointTest.java
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.undertow;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class UndertowEndpointTest {
+
+UndertowEndpoint endpoint;
+
+final URI withSlash = URI.create("http://0.0.0.0:8080/;);
+
+final URI withoutSlash = URI.create("http://0.0.0.0:8080;);
+
+@Before
+public void createEndpoint() throws URISyntaxException {
+endpoint = new UndertowEndpoint(null, null);

camel git commit: Add more to kit

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master f9e40f7c4 -> a313e4213


Add more to kit


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

Branch: refs/heads/master
Commit: a313e4213c8584243f55454002e62b320b47954c
Parents: f9e40f7
Author: Claus Ibsen 
Authored: Wed Apr 12 22:05:49 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 22:05:49 2017 +0200

--
 apache-camel/pom.xml | 9 +
 parent/pom.xml   | 7 ++-
 2 files changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a313e421/apache-camel/pom.xml
--
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index bd6fad1..f16aefc 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -359,6 +359,10 @@
 
 
   org.apache.camel
+  camel-grpc
+
+
+  org.apache.camel
   camel-guava-eventbus
 
 
@@ -1440,6 +1444,11 @@
 
 
   org.apache.camel
+  camel-grpc-starter
+  ${project.version}
+
+
+  org.apache.camel
   camel-gson-starter
   ${project.version}
 

http://git-wip-us.apache.org/repos/asf/camel/blob/a313e421/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index bcd4855..df10dde 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1174,6 +1174,11 @@
   
   
 org.apache.camel
+camel-grpc
+${project.version}
+  
+  
+org.apache.camel
 camel-guava-eventbus
 ${project.version}
   
@@ -2523,7 +2528,7 @@
   
   
 org.apache.camel
-camel-grpc
+camel-grpc-starter
 ${project.version}
   
   



[09/11] camel git commit: Review fix. Do try .. catch of Exceptions in the producer

2017-04-12 Thread davsclaus
Review fix. Do try .. catch of Exceptions in the producer

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

Branch: refs/heads/master
Commit: b1f7ea623da2748537d6349ebbea4ed3f220a31a
Parents: 3bc8d1b
Author: Preben Asmussen 
Authored: Wed Apr 12 17:25:22 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 .../camel/component/pubnub/PubNubProducer.java  | 83 ++--
 1 file changed, 43 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b1f7ea62/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubProducer.java
--
diff --git 
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubProducer.java
 
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubProducer.java
index 4e688d4..bb20e1b 100644
--- 
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubProducer.java
+++ 
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubProducer.java
@@ -20,6 +20,7 @@ import java.util.Arrays;
 
 import com.pubnub.api.PubNubException;
 import com.pubnub.api.callbacks.PNCallback;
+import com.pubnub.api.models.consumer.PNErrorData;
 import com.pubnub.api.models.consumer.PNPublishResult;
 import com.pubnub.api.models.consumer.PNStatus;
 import com.pubnub.api.models.consumer.history.PNHistoryResult;
@@ -56,43 +57,41 @@ public class PubNubProducer extends DefaultAsyncProducer {
 Operation operation = getOperation(exchange);
 
 LOG.debug("Executing {} operation", operation);
-
-switch (operation) {
-case PUBLISH: {
-doPublish(exchange, callback);
-break;
-}
-case FIRE: {
-doFire(exchange, callback);
-break;
-}
-case GETHISTORY: {
-doGetHistory(exchange, callback);
-break;
-}
-case GETSTATE: {
-doGetState(exchange, callback);
-break;
-}
-case HERENOW: {
-doHereNow(exchange, callback);
-break;
-}
-case SETSTATE: {
-doSetState(exchange, callback);
-break;
-}
-case WHERENOW: {
-doWhereNow(exchange, callback);
-break;
-}
-default:
-throw new UnsupportedOperationException(operation.toString());
-}
-if (exchange.getException() != null) {
-if (exchange.getException() instanceof PubNubException) {
-LOG.error("Exception from PubNub : {}", 
exchange.getException(PubNubException.class).getPubnubError().getMessage());
+try {
+switch (operation) {
+case PUBLISH: {
+doPublish(exchange, callback);
+break;
+}
+case FIRE: {
+doFire(exchange, callback);
+break;
 }
+case GETHISTORY: {
+doGetHistory(exchange, callback);
+break;
+}
+case GETSTATE: {
+doGetState(exchange, callback);
+break;
+}
+case HERENOW: {
+doHereNow(exchange, callback);
+break;
+}
+case SETSTATE: {
+doSetState(exchange, callback);
+break;
+}
+case WHERENOW: {
+doWhereNow(exchange, callback);
+break;
+}
+default:
+throw new UnsupportedOperationException(operation.toString());
+}
+} catch (Exception e) {
+exchange.setException(e);
 callback.done(true);
 return true;
 }
@@ -103,8 +102,7 @@ public class PubNubProducer extends DefaultAsyncProducer {
 private void doPublish(Exchange exchange, AsyncCallback callback) {
 Object body = exchange.getIn().getBody();
 if (ObjectHelper.isEmpty(body)) {
-exchange.setException(new CamelException("Can not publish empty 
message"));
-callback.done(true);
+throw new RuntimeException("Can not publish empty message");
 }
 LOG.debug("Sending message [{}] to channel [{}]", body, 
getChannel(exchange));
 endpoint.getPubnub()
@@ -222,9 +220,14 @@ public class PubNubProducer extends DefaultAsyncProducer {
 
 private void processMessage(Exchange exchange, 

[04/11] camel git commit: initial commit of camel-pubnub component

2017-04-12 Thread davsclaus
http://git-wip-us.apache.org/repos/asf/camel/blob/289a6728/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
--
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
new file mode 100644
index 000..01d51fa
--- /dev/null
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.java
@@ -0,0 +1,122 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.pubnub.example;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Random;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.pubnub.PubNubConstants;
+import org.apache.camel.main.Main;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+public final class PubNubSensor2Example {
+
+private PubNubSensor2Example() {
+}
+
+public static void main(String[] args) throws Exception {
+Main main = new Main();
+main.addRouteBuilder(new PubsubRoute());
+main.addRouteBuilder(new SimulatedDeviceEventGeneratorRoute());
+main.run();
+}
+
+static class SimulatedDeviceEventGeneratorRoute extends RouteBuilder {
+private final String deviceEP = 
"pubnub://pubsub:iot?uuid=device2=" + 
PubNubExampleConstants.PUBNUB_PUBLISHER_KEY + "="
++ 
PubNubExampleConstants.PUBNUB_SUBSCRIBER_KEY;
+private final String devicePrivateEP = 
"pubnub://pubsub:device2private?uuid=device2=" + 
PubNubExampleConstants.PUBNUB_PUBLISHER_KEY + "="
+   + 
PubNubExampleConstants.PUBNUB_SUBSCRIBER_KEY;
+
+@Override
+public void configure() throws Exception {
+//@formatter:off
+from("timer:device2").routeId("device-event-route")
+.bean(PubNubSensor2Example.EventGeneratorBean.class, 
"getRandomEvent('device2')")
+.convertBodyTo(JSONObject.class)
+.to(deviceEP);
+
+from(devicePrivateEP)
+.routeId("device-unicast-route")
+.log("Message from master to device2 : ${body}");
+//@formatter:on
+}
+}
+
+static class PubsubRoute extends RouteBuilder {
+private static String masterEP = 
"pubnub://pubsub:iot?uuid=master=" + 
PubNubExampleConstants.PUBNUB_SUBSCRIBER_KEY + "="
+ + 
PubNubExampleConstants.PUBNUB_PUBLISHER_KEY;
+private static Map devices = new 
ConcurrentHashMap();
+
+@Override
+public void configure() throws Exception {
+//@formatter:off
+from(masterEP)
+.routeId("master-route")
+.convertBodyTo(JSONObject.class)
+
.bean(PubNubSensor2Example.PubsubRoute.DataProcessorBean.class, 
"doSomethingInteresting(${body})")
+.log("${body} headers : ${headers}").to("mock:result");
+
+//TODO Could remote control device to turn on/off sensor 
measurement 
+
from("timer:master?delay=15s=5s").routeId("unicast2device-route")
+.setHeader(PubNubConstants.CHANNEL, 
method(PubNubSensor2Example.PubsubRoute.DataProcessorBean.class, 
"getUnicastChannelOfDevice()"))
+.setBody(constant("Hello device"))
+.to(masterEP);
+//@formatter:on
+}
+
+static class DataProcessorBean {
+@EndpointInject(uri = 
"pubnub://pubsub:iot?uuid=master=" + 
PubNubExampleConstants.PUBNUB_SUBSCRIBER_KEY)
+private static ProducerTemplate template;
+
+public static String getUnicastChannelOfDevice() {
+// just get the first channel
+  

[01/11] camel git commit: Add more to kit

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 514840908 -> f9e40f7c4


Add more to kit


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

Branch: refs/heads/master
Commit: f9e40f7c4ff9a20408d5dd804953f2e677a25de7
Parents: 6b96ca3
Author: Claus Ibsen 
Authored: Wed Apr 12 21:25:06 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 apache-camel/pom.xml| 24 +++
 .../src/main/descriptors/common-bin.xml | 11 -
 parent/pom.xml  | 25 
 3 files changed, 53 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f9e40f7c/apache-camel/pom.xml
--
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 64e..bd6fad1 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -1291,6 +1291,10 @@
 
 
   org.apache.camel
+  camel-digitalocean-starter
+
+
+  org.apache.camel
   camel-disruptor-starter
   ${project.version}
 
@@ -1741,6 +1745,11 @@
 
 
   org.apache.camel
+  camel-milo-starter
+  ${project.version}
+
+
+  org.apache.camel
   camel-mina2-starter
   ${project.version}
 
@@ -1876,6 +1885,11 @@
 
 
   org.apache.camel
+  camel-pubnub-starter
+  ${project.version}
+
+
+  org.apache.camel
   camel-quartz2-starter
   ${project.version}
 
@@ -1991,6 +2005,11 @@
 
 
   org.apache.camel
+  camel-sjms2-starter
+  ${project.version}
+
+
+  org.apache.camel
   camel-slack-starter
   ${project.version}
 
@@ -2239,6 +2258,11 @@
   camel-zookeeper-starter
   ${project.version}
 
+
+  org.apache.camel
+  camel-zookeeper-master-starter
+  ${project.version}
+
 
 
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f9e40f7c/apache-camel/src/main/descriptors/common-bin.xml
--
diff --git a/apache-camel/src/main/descriptors/common-bin.xml 
b/apache-camel/src/main/descriptors/common-bin.xml
index e0c6feb..b108d8e 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -73,7 +73,7 @@
 org.apache.camel:camel-docker
 org.apache.camel:camel-dozer
 org.apache.camel:camel-drill
-   org.apache.camel:camel-dropbox
+ org.apache.camel:camel-dropbox
 org.apache.camel:camel-eclipse
 org.apache.camel:camel-ehcache
 org.apache.camel:camel-ejb
@@ -231,12 +231,8 @@
 org.apache.camel:camel-splunk
 org.apache.camel:camel-spring
 org.apache.camel:camel-spring-batch
-org.apache.camel:camel-spring-boot
-org.apache.camel:camel-spring-boot-starter
 org.apache.camel:camel-spring-cloud
-org.apache.camel:camel-spring-cloud-starter
 org.apache.camel:camel-spring-cloud-netflix
-org.apache.camel:camel-spring-cloud-netflix-starter
 org.apache.camel:camel-spring-dm
 org.apache.camel:camel-spring-integration
 org.apache.camel:camel-spring-javaconfig
@@ -280,7 +276,6 @@
 org.apache.camel:camel-yammer
 org.apache.camel:camel-zipfile
 org.apache.camel:camel-zipkin
-org.apache.camel:camel-zipkin-starter
 org.apache.camel:camel-zookeeper
 org.apache.camel:camel-zookeeper-master
   
@@ -505,9 +500,10 @@
 org.apache.camel:camel-spark-starter
 org.apache.camel:camel-splunk-starter
 org.apache.camel:camel-spring-batch-starter
+org.apache.camel:camel-spring-boot
 org.apache.camel:camel-spring-boot-starter
 org.apache.camel:camel-spring-cloud-starter
-org.apache.camel:camel-spring-dm-starter
+org.apache.camel:camel-spring-cloud-netflix-starter
 org.apache.camel:camel-spring-integration-starter
 org.apache.camel:camel-spring-javaconfig-starter
 org.apache.camel:camel-spring-ldap-starter
@@ -544,6 +540,7 @@
 org.apache.camel:camel-zipfile-starter
 org.apache.camel:camel-zipkin-starter
 org.apache.camel:camel-zookeeper-starter
+org.apache.camel:camel-zookeeper-master-starter
   
 
   

http://git-wip-us.apache.org/repos/asf/camel/blob/f9e40f7c/parent/pom.xml
--
diff --git a/parent/pom.xml 

[05/11] camel git commit: initial commit of camel-pubnub component

2017-04-12 Thread davsclaus
initial commit of camel-pubnub component

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

Branch: refs/heads/master
Commit: 289a67285a21e6f48cfd8857953ba88b1a4993e9
Parents: 5148409
Author: Preben Asmussen 
Authored: Fri Mar 24 22:49:13 2017 +0100
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 components/camel-pubnub/pom.xml |  80 +++
 .../camel/component/pubnub/JsonConverter.java   |  46 
 .../camel/component/pubnub/PubNubComponent.java |  54 +
 .../component/pubnub/PubNubConfiguration.java   | 146 +
 .../camel/component/pubnub/PubNubConstants.java |  24 ++
 .../camel/component/pubnub/PubNubConsumer.java  | 120 ++
 .../camel/component/pubnub/PubNubEndpoint.java  | 218 +++
 .../component/pubnub/PubNubEndpointType.java|  32 +++
 .../camel/component/pubnub/PubNubProducer.java  | 146 +
 .../src/main/resources/META-INF/LICENSE.txt | 203 +
 .../src/main/resources/META-INF/NOTICE.txt  |  11 +
 .../services/org/apache/camel/TypeConverter |  18 ++
 .../services/org/apache/camel/component/pubnub  |  17 ++
 .../component/pubnub/PubNubComponentTest.java   |  61 ++
 .../pubnub/PubNubConfigurationTest.java |  55 +
 .../pubnub/PubNubEmptyPayloadTest.java  |  55 +
 .../camel/component/pubnub/PubNubMock.java  | 186 
 .../component/pubnub/PubNubOperationsTest.java  |  91 
 .../component/pubnub/PubNubPresensTest.java |  72 ++
 .../pubnub/example/PubNubExampleConstants.java  |  24 ++
 .../pubnub/example/PubNubOperationsExample.java |  61 ++
 .../pubnub/example/PubNubPresenseExample.java   |  44 
 .../pubnub/example/PubNubSensor2Example.html|  87 
 .../pubnub/example/PubNubSensor2Example.java| 122 +++
 .../pubnub/example/PubNubSensorExample.java |  40 
 .../src/test/resources/log4j2.properties|  28 +++
 components/pom.xml  |   1 +
 parent/pom.xml  |   1 +
 28 files changed, 2043 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/289a6728/components/camel-pubnub/pom.xml
--
diff --git a/components/camel-pubnub/pom.xml b/components/camel-pubnub/pom.xml
new file mode 100644
index 000..268cb2a
--- /dev/null
+++ b/components/camel-pubnub/pom.xml
@@ -0,0 +1,80 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
+  4.0.0
+  
+org.apache.camel
+components
+2.19.0-SNAPSHOT
+  
+
+  camel-pubnub
+  jar
+
+  Camel :: PubNub
+  Camel PubNub component
+
+  
+
org.apache.camel.component.pubnub.*
+
org.apache.camel.spi.ComponentResolver;component=pubnub
+  
+
+  
+
+
+  org.apache.camel
+  camel-core
+
+
+  com.pubnub
+  pubnub
+  ${pubnub-version}
+
+
+  com.google.code.gson
+  gson
+  ${gson-version}
+
+
+  org.apache.commons
+  commons-lang3
+  ${commons-lang3-version}
+
+
+  org.json
+  json
+  20160810
+
+
+
+  org.apache.camel
+  camel-test
+  test
+
+
+  org.slf4j
+  slf4j-log4j12
+  test
+
+
+  log4j
+  log4j
+  test
+
+
+  org.apache.camel
+  camel-netty-http
+  test
+
+  
+

http://git-wip-us.apache.org/repos/asf/camel/blob/289a6728/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
--
diff --git 
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
 
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
new file mode 100644
index 000..e5f09a0
--- /dev/null
+++ 
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  

[11/11] camel git commit: CAMEL-11136: Add to kit and polished

2017-04-12 Thread davsclaus
CAMEL-11136: Add to kit and polished


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

Branch: refs/heads/master
Commit: 5f47c859d930f1b3220f04dd4077eb5cd8ca3962
Parents: b1f7ea6
Author: Claus Ibsen 
Authored: Wed Apr 12 21:16:37 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 apache-camel/pom.xml|   4 +
 .../src/main/descriptors/common-bin.xml |   1 +
 camel-core/readme-eip.adoc  |  21 +-
 camel-core/readme.adoc  |  52 ++---
 components/camel-pubnub/pom.xml |  16 +-
 .../src/main/docs/pubnub-component.adoc |  17 +-
 .../camel/component/pubnub/PubNubComponent.java |   5 +-
 .../component/pubnub/PubNubConfiguration.java   |   1 -
 .../camel/component/pubnub/PubNubConsumer.java  |  10 +-
 .../camel/component/pubnub/PubNubEndpoint.java  |   4 +-
 .../services/org/apache/camel/component/pubnub  |   1 +
 components/readme.adoc  |  55 ++---
 docs/user-manual/en/SUMMARY.md  |   1 +
 parent/pom.xml  |   5 +
 .../camel-pubnub-starter/pom.xml|  51 +
 .../PubNubComponentAutoConfiguration.java   |  80 
 .../src/main/resources/META-INF/LICENSE.txt | 203 +++
 .../src/main/resources/META-INF/NOTICE.txt  |  11 +
 ...dditional-spring-configuration-metadata.json |  10 +
 .../main/resources/META-INF/spring.factories|  19 ++
 .../src/main/resources/META-INF/spring.provides |  18 ++
 21 files changed, 483 insertions(+), 102 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5f47c859/apache-camel/pom.xml
--
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 558cd9c..285ce04 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -738,6 +738,10 @@
 
 
   org.apache.camel
+  camel-pubnub
+
+
+  org.apache.camel
   camel-quartz
 
 

http://git-wip-us.apache.org/repos/asf/camel/blob/5f47c859/apache-camel/src/main/descriptors/common-bin.xml
--
diff --git a/apache-camel/src/main/descriptors/common-bin.xml 
b/apache-camel/src/main/descriptors/common-bin.xml
index 9f297e2..c320469 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -192,6 +192,7 @@
 org.apache.camel:camel-pgevent
 org.apache.camel:camel-printer
 org.apache.camel:camel-protobuf
+org.apache.camel:camel-pubnub
 org.apache.camel:camel-quartz
 org.apache.camel:camel-quartz2
 org.apache.camel:camel-quickfix

http://git-wip-us.apache.org/repos/asf/camel/blob/5f47c859/camel-core/readme-eip.adoc
--
diff --git a/camel-core/readme-eip.adoc b/camel-core/readme-eip.adoc
index 0fe8021..e652b4d 100644
--- a/camel-core/readme-eip.adoc
+++ b/camel-core/readme-eip.adoc
@@ -4,7 +4,7 @@ Enterprise Integration Patterns
 Camel supports most of the link:http://www.eaipatterns.com/toc.html[Enterprise 
Integration Patterns] from the excellent book by 
link:http://www.amazon.com/exec/obidos/search-handle-url/105-9796798-8100401?%5Fencoding=UTF8=ss=books=Gregor%20Hohpe[Gregor
 Hohpe] and 
link:http://www.amazon.com/exec/obidos/search-handle-url/105-9796798-8100401?%5Fencoding=UTF8=ss=books=Bobby%20Woolf[Bobby
 Woolf].
 
 // eips: START
-Number of EIPs: 62 (2 deprecated)
+Number of EIPs: 57 (0 deprecated)
 
 [width="100%",cols="4,6",options="header"]
 |===
@@ -23,7 +23,7 @@ Number of EIPs: 62 (2 deprecated)
 `` | Routes messages based on a series of predicates
 
 | link:src/main/docs/eips/circuitBreaker-eip.adoc[Circuit Breaker] +
-`` | *deprecated* Circuit break load balancer
+`` | Circuit break load balancer
 
 | link:src/main/docs/eips/convertBodyTo-eip.adoc[Convert Body To] +
 `` | Converts the message body to another type
@@ -49,12 +49,6 @@ Number of EIPs: 62 (2 deprecated)
 | link:src/main/docs/eips/from-eip.adoc[From] +
 `` | Act as a message source as input to a route
 
-| link:src/main/docs/eips/hystrix-eip.adoc[Hystrix] +
-`` | Hystrix Circuit Breaker EIP
-
-| link:src/main/docs/eips/hystrixConfiguration-eip.adoc[Hystrix Configuration] 
+
-`` | Hystrix Circuit Breaker EIP configuration
-
 | link:src/main/docs/eips/idempotentConsumer-eip.adoc[Idempotent Consumer] +
 `` | 

[02/11] camel git commit: Add more to kit

2017-04-12 Thread davsclaus
Add more to kit


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

Branch: refs/heads/master
Commit: b1eb86f1fe604bfec605357da25db77039faae53
Parents: 5f47c85
Author: Claus Ibsen 
Authored: Wed Apr 12 21:22:16 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 apache-camel/pom.xml | 8 
 apache-camel/src/main/descriptors/common-bin.xml | 3 +++
 2 files changed, 11 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b1eb86f1/apache-camel/pom.xml
--
diff --git a/apache-camel/pom.xml b/apache-camel/pom.xml
index 285ce04..64e 100644
--- a/apache-camel/pom.xml
+++ b/apache-camel/pom.xml
@@ -227,6 +227,10 @@
 
 
   org.apache.camel
+  camel-digitalocean
+
+
+  org.apache.camel
   camel-disruptor
 
 
@@ -622,6 +626,10 @@
 
 
   org.apache.camel
+  camel-milo
+
+
+  org.apache.camel
   camel-mina
 
 

http://git-wip-us.apache.org/repos/asf/camel/blob/b1eb86f1/apache-camel/src/main/descriptors/common-bin.xml
--
diff --git a/apache-camel/src/main/descriptors/common-bin.xml 
b/apache-camel/src/main/descriptors/common-bin.xml
index c320469..e0c6feb 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -162,6 +162,7 @@
 org.apache.camel:camel-lumberjack
 org.apache.camel:camel-lzf
 org.apache.camel:camel-metrics
+org.apache.camel:camel-milo
 org.apache.camel:camel-mail
 org.apache.camel:camel-mina
 org.apache.camel:camel-mina2
@@ -442,6 +443,7 @@
 org.apache.camel:camel-lzf-starter
 org.apache.camel:camel-mail-starter
 org.apache.camel:camel-metrics-starter
+org.apache.camel:camel-milo-starter
 org.apache.camel:camel-mina2-starter
 org.apache.camel:camel-mllp-starter
 org.apache.camel:camel-mongodb-gridfs-starter
@@ -469,6 +471,7 @@
 org.apache.camel:camel-pgevent-starter
 org.apache.camel:camel-printer-starter
 org.apache.camel:camel-protobuf-starter
+org.apache.camel:camel-pubnub-starter
 org.apache.camel:camel-quartz2-starter
 org.apache.camel:camel-quickfix-starter
 org.apache.camel:camel-rabbitmq-starter



[10/11] camel git commit: Remove camel-core-xml as spring boot starter as its not intended for standalone

2017-04-12 Thread davsclaus
Remove camel-core-xml as spring boot starter as its not intended for standalone


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

Branch: refs/heads/master
Commit: 6b96ca3c4a861b5e8d1165ba4871346e10264a9c
Parents: b1eb86f
Author: Claus Ibsen 
Authored: Wed Apr 12 21:24:04 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 .../camel-core-xml-starter/pom.xml  |  51 -
 .../src/main/resources/META-INF/LICENSE.txt | 203 ---
 .../src/main/resources/META-INF/NOTICE.txt  |  11 -
 .../src/main/resources/META-INF/spring.provides |  18 --
 .../spring-boot/components-starter/pom.xml  |   1 -
 .../maven/packaging/SpringBootStarterMojo.java  |   2 +-
 6 files changed, 1 insertion(+), 285 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/6b96ca3c/platforms/spring-boot/components-starter/camel-core-xml-starter/pom.xml
--
diff --git 
a/platforms/spring-boot/components-starter/camel-core-xml-starter/pom.xml 
b/platforms/spring-boot/components-starter/camel-core-xml-starter/pom.xml
deleted file mode 100644
index 3e535b1..000
--- a/platforms/spring-boot/components-starter/camel-core-xml-starter/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
-  4.0.0
-  
-org.apache.camel
-components-starter
-2.19.0-SNAPSHOT
-  
-  camel-core-xml-starter
-  jar
-  Spring-Boot Starter :: Camel :: Core XML
-  Spring-Boot Starter for Camel Core XML support
-  
-
-  org.springframework.boot
-  spring-boot-starter
-  ${spring-boot-version}
-
-
-  org.apache.camel
-  camel-core-xml
-  ${project.version}
-
-
-
-  org.apache.camel
-  camel-core-starter
-
-
-  org.apache.camel
-  camel-spring-boot-starter
-
-
-  
-

http://git-wip-us.apache.org/repos/asf/camel/blob/6b96ca3c/platforms/spring-boot/components-starter/camel-core-xml-starter/src/main/resources/META-INF/LICENSE.txt
--
diff --git 
a/platforms/spring-boot/components-starter/camel-core-xml-starter/src/main/resources/META-INF/LICENSE.txt
 
b/platforms/spring-boot/components-starter/camel-core-xml-starter/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..000
--- 
a/platforms/spring-boot/components-starter/camel-core-xml-starter/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
-   Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-  "License" shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  "Licensor" shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  "Legal Entity" shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  "control" means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  "You" (or "Your") shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  "Source" form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  "Object" form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  "Work" shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  "Derivative Works" shall mean 

[06/11] camel git commit: fixes after review comments

2017-04-12 Thread davsclaus
fixes after review comments

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

Branch: refs/heads/master
Commit: 3bc8d1b1d5d4ca2bf6a07584c13cead47b08dd1e
Parents: a070919
Author: Preben Asmussen 
Authored: Wed Apr 12 10:39:35 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 components/camel-pubnub/pom.xml | 26 
 .../src/main/docs/pubnub-component.adoc | 12 -
 .../component/pubnub/PubNubConfiguration.java   |  4 +--
 .../camel/component/pubnub/PubNubConsumer.java  |  2 +-
 .../camel/component/pubnub/PubNubEndpoint.java  |  7 ++
 .../pubnub/PubNubConfigurationTest.java |  4 +--
 .../camel/component/pubnub/PubNubFireTest.java  |  2 +-
 .../component/pubnub/PubNubPresensTest.java |  2 +-
 .../component/pubnub/PubNubPublishTest.java |  2 +-
 .../component/pubnub/PubNubSubscriberTest.java  |  2 +-
 .../example/PubNubGeoLocationExample.java   |  4 +--
 .../pubnub/example/PubNubPresenseExample.java   |  2 +-
 .../pubnub/example/PubNubSensor2Example.java|  8 +++---
 .../pubnub/example/PubNubSensorExample.java |  2 +-
 14 files changed, 41 insertions(+), 38 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/pom.xml
--
diff --git a/components/camel-pubnub/pom.xml b/components/camel-pubnub/pom.xml
index 5c831df..2999a2b 100644
--- a/components/camel-pubnub/pom.xml
+++ b/components/camel-pubnub/pom.xml
@@ -1,14 +1,20 @@
 
-
+
 http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
   4.0.0

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/main/docs/pubnub-component.adoc
--
diff --git a/components/camel-pubnub/src/main/docs/pubnub-component.adoc 
b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
index ead5556..9124563 100644
--- a/components/camel-pubnub/src/main/docs/pubnub-component.adoc
+++ b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
@@ -49,7 +49,7 @@ The PubNub component has no options.
 // endpoint options: START
 The PubNub endpoint is configured using URI syntax:
 
-pubnub://channel
+pubnub:channel
 
 with the following path and query parameters:
 
@@ -66,19 +66,19 @@ with the following path and query parameters:
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| **pubnub** (common) | Reference to a Pubnub client in the registry. |  | 
PubNub
-| **secure** (common) | Use ssl | true | boolean
 | **uuid** (common) | UUID to be used as a device identifier a default UUID is 
generated if not passed. |  | String
 | **bridgeErrorHandler** (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages or the likes will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | **withPresence** (consumer) | Also subscribe to related presence information 
| false | boolean
 | **exceptionHandler** (consumer) | To let the consumer use a custom 
ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this 
options is not in use. By default the consumer will deal with exceptions that 
will be logged at WARN or ERROR level and ignored. |  | ExceptionHandler
 | **exchangePattern** (consumer) | Sets the exchange pattern when the consumer 
creates an exchange. |  | ExchangePattern
 | **operation** (producer) | The operation to perform. PUBLISH: Default. Send 
a message to all subscribers of a channel. FIRE: allows the client to send a 
message to BLOCKS Event Handlers. These messages will go directly to any Event 
Handlers registered on the channel that you fire to and will trigger their 
execution HERENOW: Obtain information about the current state of a channel 
including a list of unique user-ids currently subscribed to the channel and the 
total occupancy count. WHERENOW: Obtain information about the current list of 
channels to which a uuid is subscribed to. GETSTATE: Used to get key/value 
pairs specific 

[07/11] camel git commit: refactor component and upgrade PubNub library

2017-04-12 Thread davsclaus
http://git-wip-us.apache.org/repos/asf/camel/blob/13042923/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubOperationsExample.java
--
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubOperationsExample.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubOperationsExample.java
deleted file mode 100644
index 10db410..000
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubOperationsExample.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.component.pubnub.example;
-
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.main.Main;
-import org.json.JSONObject;
-
-//@formatter:off
-/**
- * Just a small http server hack to try out pubnub method calls. 
- * HERE_NOW, WHERE_NOW, GET_STATE, SET_STATE, GET_HISTORY, PUBLISH; 
- * usage : 
- * do a GET with http param CamelPubNubOperation=METHOD_TO_ACTIVATE eg. 
HERE_NOW 
- * 
- * SET_STATE requires a http param 'body' with some json that is used as 
pubnub state object. 
- * Can be any valid json string.
- *
- */
-//@formatter:on
-public final class PubNubOperationsExample {
-
-private PubNubOperationsExample() {
-}
-
-public static void main(String[] args) throws Exception {
-Main main = new Main();
-main.addRouteBuilder(new RestRoute());
-main.run();
-}
-
-static class RestRoute extends RouteBuilder {
-private String pubnub = "pubnub://pubsub:iot?publisherKey=" + 
PubNubExampleConstants.PUBNUB_PUBLISHER_KEY + "="
-+ PubNubExampleConstants.PUBNUB_SUBSCRIBER_KEY;
-
-@Override
-public void configure() throws Exception {
-//@formatter:off
-from("netty-http:http://0.0.0.0:8080?urlDecodeHeaders=true;)
-.setBody(simple("${header.body}"))
-.convertBodyTo(JSONObject.class)
-.to(pubnub);
-//@formatter:on
-}
-}
-
-}

http://git-wip-us.apache.org/repos/asf/camel/blob/13042923/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
--
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
index 2122bf0..faac12c 100644
--- 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
+++ 
b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubPresenseExample.java
@@ -19,6 +19,8 @@ package org.apache.camel.component.pubnub.example;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.main.Main;
 
+import static 
org.apache.camel.component.pubnub.example.PubNubExampleConstants.PUBNUB_SUBSCRIBER_KEY;
+
 public final class PubNubPresenseExample {
 
 private PubNubPresenseExample() {
@@ -33,11 +35,9 @@ public final class PubNubPresenseExample {
 static class PresensRoute extends RouteBuilder {
 @Override
 public void configure() throws Exception {
-//@formatter:off
-from("pubnub://presence:iot?subscriberKey=" + 
PubNubExampleConstants.PUBNUB_SUBSCRIBER_KEY)
+from("pubnub:iot?withPresence=true=" + 
PUBNUB_SUBSCRIBER_KEY)
 .log("${body}")
 .to("mock:result");
-//@formatter:on
 }
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/13042923/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.html
--
diff --git 
a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensor2Example.html
 

[03/11] camel git commit: polished

2017-04-12 Thread davsclaus
polished

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

Branch: refs/heads/master
Commit: a070919d3016b980ec7536547801ae7ef25b84b6
Parents: 1304292
Author: Preben Asmussen 
Authored: Tue Apr 11 10:21:21 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 .../src/main/docs/pubnub-component.adoc | 143 +++
 .../component/pubnub/PubNubConfiguration.java   |  55 ---
 .../camel/component/pubnub/PubNubEndpoint.java  |   7 +-
 .../camel/component/pubnub/PubNubProducer.java  |  39 ++---
 .../pubnub/PubNubConfigurationTest.java |  10 +-
 .../camel/component/pubnub/PubNubFireTest.java  |  69 +
 .../component/pubnub/PubNubOperationsTest.java  |  12 +-
 .../component/pubnub/PubNubPresensTest.java |   2 +-
 .../component/pubnub/PubNubPublishTest.java |   4 +-
 .../component/pubnub/PubNubSubscriberTest.java  |   2 +-
 .../pubnub/example/PubNubExampleConstants.java  |   6 +-
 .../example/PubNubGeoLocationExample.java   |  43 ++
 .../pubnub/example/PubNubPresenseExample.java   |   4 +-
 .../pubnub/example/PubNubSensor2Example.java|  14 +-
 .../pubnub/example/PubNubSensorExample.java |   2 +-
 .../src/test/resources/log4j2.properties|   2 +-
 parent/pom.xml  |   2 +-
 17 files changed, 348 insertions(+), 68 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a070919d/components/camel-pubnub/src/main/docs/pubnub-component.adoc
--
diff --git a/components/camel-pubnub/src/main/docs/pubnub-component.adoc 
b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
new file mode 100644
index 000..ead5556
--- /dev/null
+++ b/components/camel-pubnub/src/main/docs/pubnub-component.adoc
@@ -0,0 +1,143 @@
+## PubNub Component
+
+*Available as of Camel version *
+
+Camel PubNub component can be used to communicate with the 
https://www.pubnub.com/[PubNub] data stream network for connected devices. This 
component uses pubnub https://github.com/pubnub/java[java library].
+
+### Use cases include
+
+** Chat rooms: Sending and receiving messages
+** Locations and Connected cars: dispatching taxi cabs
+** Smart sensors: Receiving data from a sensor for data visualizations
+** Health: Monitoring heart rate from a patient's wearable device
+** Multiplayer gamings
+** Interactive media: audience-participating voting system
+
+
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+
+
+org.apache.camel
+camel-pubnub
+x.x.x
+
+
+
+
+### URI format
+
+[source,java]
+
+pubnub://channel[?options]
+
+
+Where *channel* is the PubNub channel to publish or subscribe to.
+
+### Options
+
+
+// component options: START
+The PubNub component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The PubNub endpoint is configured using URI syntax:
+
+pubnub://channel
+
+with the following path and query parameters:
+
+ Path Parameters (1 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| **channel** | *Required* The channel used for subscribing/publishing events 
|  | String
+|===
+
+ Query Parameters (14 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| **pubnub** (common) | Reference to a Pubnub client in the registry. |  | 
PubNub
+| **secure** (common) | Use ssl | true | boolean
+| **uuid** (common) | UUID to be used as a device identifier a default UUID is 
generated if not passed. |  | String
+| **bridgeErrorHandler** (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages or the likes will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored. | false | 
boolean
+| **withPresence** (consumer) | Also subscribe to related presence information 
| false | 

[08/11] camel git commit: refactor component and upgrade PubNub library

2017-04-12 Thread davsclaus
refactor component and upgrade PubNub library


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

Branch: refs/heads/master
Commit: 13042923d6451cfb3e3fa0eb7449aa309b9dce04
Parents: 289a672
Author: Preben Asmussen 
Authored: Sun Apr 2 14:27:09 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 21:56:07 2017 +0200

--
 components/camel-pubnub/pom.xml |  27 ++-
 .../camel/component/pubnub/JsonConverter.java   |  46 
 .../camel/component/pubnub/PubNubComponent.java |  16 +-
 .../component/pubnub/PubNubConfiguration.java   |  61 +++--
 .../camel/component/pubnub/PubNubConstants.java |  10 +-
 .../camel/component/pubnub/PubNubConsumer.java  |  89 ---
 .../camel/component/pubnub/PubNubEndpoint.java  | 163 ++---
 .../component/pubnub/PubNubEndpointType.java|  32 ---
 .../camel/component/pubnub/PubNubProducer.java  | 242 ++-
 .../services/org/apache/camel/TypeConverter |  18 --
 .../component/pubnub/PubNubComponentTest.java   |  61 -
 .../pubnub/PubNubConfigurationTest.java |  29 +--
 .../pubnub/PubNubEmptyPayloadTest.java  |  55 -
 .../camel/component/pubnub/PubNubMock.java  | 186 --
 .../component/pubnub/PubNubOperationsTest.java  | 110 ++---
 .../component/pubnub/PubNubPresensTest.java |  50 ++--
 .../component/pubnub/PubNubPublishTest.java |  93 +++
 .../component/pubnub/PubNubSubscriberTest.java  |  60 +
 .../camel/component/pubnub/PubNubTestBase.java  | 107 
 .../pubnub/example/PubNubExampleConstants.java  |   4 +-
 .../pubnub/example/PubNubOperationsExample.java |  61 -
 .../pubnub/example/PubNubPresenseExample.java   |   6 +-
 .../pubnub/example/PubNubSensor2Example.html| 143 ++-
 .../pubnub/example/PubNubSensor2Example.java|  82 ---
 .../pubnub/example/PubNubSensorExample.java |   2 +-
 .../src/test/resources/log4j2.properties|   2 +-
 parent/pom.xml  |   2 +-
 .../spring-boot/components-starter/pom.xml  |   1 +
 28 files changed, 840 insertions(+), 918 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/13042923/components/camel-pubnub/pom.xml
--
diff --git a/components/camel-pubnub/pom.xml b/components/camel-pubnub/pom.xml
index 268cb2a..5c831df 100644
--- a/components/camel-pubnub/pom.xml
+++ b/components/camel-pubnub/pom.xml
@@ -37,7 +37,7 @@
 
 
   com.pubnub
-  pubnub
+  pubnub-gson
   ${pubnub-version}
 
 
@@ -45,16 +45,24 @@
   gson
   ${gson-version}
 
+
+   
 
-  org.apache.commons
-  commons-lang3
-  ${commons-lang3-version}
+  org.apache.logging.log4j
+  log4j-api
+  test
+
+
+  org.apache.logging.log4j
+  log4j-core
+  test
 
 
-  org.json
-  json
-  20160810
+  org.apache.logging.log4j
+  log4j-slf4j-impl
+  test
 
+
 
 
   org.apache.camel
@@ -72,8 +80,9 @@
   test
 
 
-  org.apache.camel
-  camel-netty-http
+  com.github.tomakehurst
+  wiremock
+  ${wiremock-version}
   test
 
   

http://git-wip-us.apache.org/repos/asf/camel/blob/13042923/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
--
diff --git 
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
 
b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
deleted file mode 100644
index e5f09a0..000
--- 
a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/JsonConverter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions 

[2/5] camel git commit: add profile for testing zendesk

2017-04-12 Thread janstey
add profile for testing zendesk


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

Branch: refs/heads/master
Commit: 4ad56f1befefd9defd930b55a843b47bd324c87f
Parents: 14a6ade
Author: Jonathan Anstey 
Authored: Wed Apr 12 17:06:28 2017 -0230
Committer: Jonathan Anstey 
Committed: Wed Apr 12 17:13:00 2017 -0230

--
 components/camel-zendesk/pom.xml | 26 ++
 1 file changed, 26 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/4ad56f1b/components/camel-zendesk/pom.xml
--
diff --git a/components/camel-zendesk/pom.xml b/components/camel-zendesk/pom.xml
index 016b15b..12a02d2 100644
--- a/components/camel-zendesk/pom.xml
+++ b/components/camel-zendesk/pom.xml
@@ -240,6 +240,32 @@
 
   
 
+  
+
+  zendesk-test
+  
+
+  
+maven-surefire-plugin
+
+  false
+  true
+  1
+  true
+  
300
+  
+**/*XXXTest.java
+  
+  
+**/*Test.java
+  
+
+  
+
+  
+
+  
+
   
 
   



[4/5] camel git commit: upgrade to zendesk client 0.5.4

2017-04-12 Thread janstey
upgrade to zendesk client 0.5.4


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

Branch: refs/heads/master
Commit: 14a6adea6b1923cc26d0efe0a3dc3a9653f7e5d0
Parents: 1262a81
Author: Jonathan Anstey 
Authored: Wed Apr 12 17:00:14 2017 -0230
Committer: Jonathan Anstey 
Committed: Wed Apr 12 17:13:00 2017 -0230

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/14a6adea/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 64d33ce..65387c8 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -691,7 +691,7 @@
 1.4.9
 1.2.5
 2.2.0
-0.5.3
+0.5.4
 1.19.4
 0.6.13
 0.3.0



[5/5] camel git commit: tidy

2017-04-12 Thread janstey
tidy


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

Branch: refs/heads/master
Commit: 514840908bfebbf4112aeefdf9f3751dcc539a11
Parents: f0bf7ba
Author: Jonathan Anstey 
Authored: Wed Apr 12 17:11:25 2017 -0230
Committer: Jonathan Anstey 
Committed: Wed Apr 12 17:13:01 2017 -0230

--
 .../camel/component/zendesk/ZendeskComponent.java   |  1 -
 .../component/zendesk/ZendeskConfiguration.java |  4 
 .../camel/component/zendesk/ZendeskConsumer.java|  3 ---
 .../camel/component/zendesk/ZendeskEndpoint.java|  5 -
 .../camel/component/zendesk/ZendeskProducer.java|  2 --
 .../component/zendesk/internal/ZendeskHelper.java   | 16 
 6 files changed, 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/51484090/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
--
diff --git 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
index c52366c..199734c 100644
--- 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
+++ 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskComponent.java
@@ -23,7 +23,6 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.component.zendesk.internal.ZendeskApiCollection;
 import org.apache.camel.component.zendesk.internal.ZendeskApiName;
 import org.apache.camel.component.zendesk.internal.ZendeskHelper;
-import org.apache.camel.impl.DefaultComponent;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.component.AbstractApiComponent;

http://git-wip-us.apache.org/repos/asf/camel/blob/51484090/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConfiguration.java
--
diff --git 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConfiguration.java
 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConfiguration.java
index 15c755d..d4bae86 100644
--- 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConfiguration.java
+++ 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConfiguration.java
@@ -16,10 +16,6 @@
  */
 package org.apache.camel.component.zendesk;
 
-import java.util.Map;
-
-import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.component.zendesk.internal.ZendeskApiName;
 import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;

http://git-wip-us.apache.org/repos/asf/camel/blob/51484090/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConsumer.java
--
diff --git 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConsumer.java
 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConsumer.java
index 944f059..d39e492 100644
--- 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConsumer.java
+++ 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskConsumer.java
@@ -16,9 +16,6 @@
  */
 package org.apache.camel.component.zendesk;
 
-import java.util.List;
-import java.util.Stack;
-
 import org.apache.camel.Processor;
 import org.apache.camel.component.zendesk.internal.ZendeskApiName;
 import org.apache.camel.util.component.AbstractApiConsumer;

http://git-wip-us.apache.org/repos/asf/camel/blob/51484090/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskEndpoint.java
--
diff --git 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskEndpoint.java
 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskEndpoint.java
index 5b44b1f..4e60c37 100644
--- 
a/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskEndpoint.java
+++ 
b/components/camel-zendesk/src/main/java/org/apache/camel/component/zendesk/ZendeskEndpoint.java
@@ -16,7 +16,6 @@
  */
 package org.apache.camel.component.zendesk;
 
-import java.lang.reflect.Proxy;
 import java.util.Map;
 
 import 

[3/5] camel git commit: Fix CS

2017-04-12 Thread janstey
Fix CS


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

Branch: refs/heads/master
Commit: 1262a81a16ef0b1063af579fde0152c963048233
Parents: 67ab9a9
Author: Jonathan Anstey 
Authored: Wed Apr 12 16:33:17 2017 -0230
Committer: Jonathan Anstey 
Committed: Wed Apr 12 17:13:00 2017 -0230

--
 .../java/org/apache/camel/component/http4/HttpComponent.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1262a81a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
--
diff --git 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
index b465374..dd09fea 100644
--- 
a/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
+++ 
b/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpComponent.java
@@ -85,8 +85,6 @@ public class HttpComponent extends HttpCommonComponent 
implements RestProducerFa
 + " Important: Only one instance of 
org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent."
 + " If you need to use 2 or more different instances, you need to 
define a new HttpComponent per instance you need.")
 protected SSLContextParameters sslContextParameters;
-@Metadata(label = "security", defaultValue = "false")
-private boolean useGlobalSslContextParameters;
 @Metadata(label = "security", description = "To use a custom 
X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier.")
 protected HostnameVerifier x509HostnameVerifier = new 
DefaultHostnameVerifier();
 @Metadata(label = "producer", description = "To use a custom 
org.apache.http.client.CookieStore."
@@ -103,6 +101,8 @@ public class HttpComponent extends HttpCommonComponent 
implements RestProducerFa
 // It's MILLISECONDS, the default value is always keep alive
 @Metadata(label = "advanced", description = "The time for connection to 
live, the time unit is millisecond, the default value is always keep alive.")
 protected long connectionTimeToLive = -1;
+@Metadata(label = "security", defaultValue = "false")
+private boolean useGlobalSslContextParameters;
 
 public HttpComponent() {
 super(HttpEndpoint.class);



[1/5] camel git commit: tidy

2017-04-12 Thread janstey
Repository: camel
Updated Branches:
  refs/heads/master 67ab9a972 -> 514840908


tidy


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

Branch: refs/heads/master
Commit: f0bf7ba1cf16ed0d9e60977f80c3f7ef05896583
Parents: 4ad56f1
Author: Jonathan Anstey 
Authored: Wed Apr 12 17:07:42 2017 -0230
Committer: Jonathan Anstey 
Committed: Wed Apr 12 17:13:00 2017 -0230

--
 components/camel-zendesk/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f0bf7ba1/components/camel-zendesk/pom.xml
--
diff --git a/components/camel-zendesk/pom.xml b/components/camel-zendesk/pom.xml
index 12a02d2..c318753 100644
--- a/components/camel-zendesk/pom.xml
+++ b/components/camel-zendesk/pom.xml
@@ -251,7 +251,7 @@
   false
   true
   1
-  true
+  true
   
300
   
 **/*XXXTest.java



[2/6] camel git commit: CAMEL-11139: Catch throwable in other places and also in the consumer cache

2017-04-12 Thread davsclaus
CAMEL-11139: Catch throwable in other places and also in the consumer cache


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

Branch: refs/heads/master
Commit: 67ab9a97250909e7ba7a3081d9f506ad22702248
Parents: d6cdc99
Author: Claus Ibsen 
Authored: Wed Apr 12 20:57:41 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 20:57:41 2017 +0200

--
 .../src/main/java/org/apache/camel/impl/ConsumerCache.java   | 4 ++--
 .../src/main/java/org/apache/camel/impl/ProducerCache.java   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/67ab9a97/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
index 20deb90..4cb8ef4 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
@@ -145,7 +145,7 @@ public class ConsumerCache extends ServiceSupport {
 LOG.debug("Released PollingConsumer: {} is stopped as 
consumer cache is full", endpoint);
 }
 ServiceHelper.stopAndShutdownService(pollingConsumer);
-} catch (Exception ex) {
+} catch (Throwable ex) {
 if (ex instanceof RuntimeCamelException) {
 throw (RuntimeCamelException)ex;
 } else {
@@ -171,7 +171,7 @@ public class ConsumerCache extends ServiceSupport {
 try {
 answer = endpoint.createPollingConsumer();
 answer.start();
-} catch (Exception e) {
+} catch (Throwable e) {
 throw new FailedToCreateConsumerException(endpoint, e);
 }
 if (pooled && answer instanceof ServicePoolAware) {

http://git-wip-us.apache.org/repos/asf/camel/blob/67ab9a97/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
index bfd20f0..faa0f72 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
@@ -320,7 +320,7 @@ public class ProducerCache extends ServiceSupport {
 doneSync -> asyncDispatchExchange(endpoint, 
producer, resultProcessor,
 finalExchange, producerCallback));
 return false;
-} catch (Exception e) {
+} catch (Throwable e) {
 // populate failed so return
 innerExchange.setException(e);
 producerCallback.done(true);
@@ -575,7 +575,7 @@ public class ProducerCache extends ServiceSupport {
 // add as service which will also start the service
 // (false => we and handling the lifecycle of the producer in 
this cache)
 getCamelContext().addService(answer, false);
-} catch (Exception e) {
+} catch (Throwable e) {
 throw new FailedToCreateProducerException(endpoint, e);
 }
 



[1/6] camel git commit: [CAMEL-11139] ClassNotFoundException may silently be ignored in InProducer

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x bd221e8b8 -> 96fc48c3e
  refs/heads/camel-2.18.x bb68f9659 -> 33dd5eb61
  refs/heads/master df1cda698 -> 67ab9a972


[CAMEL-11139] ClassNotFoundException may silently be ignored in InProducer


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

Branch: refs/heads/master
Commit: d6cdc99b5fa79e03fdf79d9b3e98858399c7be79
Parents: df1cda6
Author: Thomas Diesler 
Authored: Wed Apr 12 14:43:39 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 20:54:22 2017 +0200

--
 camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/d6cdc99b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
index 1062029..bfd20f0 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
@@ -504,7 +504,7 @@ public class ProducerCache extends ServiceSupport {
 // lets populate using the processor callback
 try {
 processor.process(exchange);
-} catch (Exception e) {
+} catch (Throwable e) {
 // populate failed so return
 exchange.setException(e);
 return exchange;



[4/6] camel git commit: CAMEL-11139: Catch throwable in other places and also in the consumer cache

2017-04-12 Thread davsclaus
CAMEL-11139: Catch throwable in other places and also in the consumer cache


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

Branch: refs/heads/camel-2.18.x
Commit: 33dd5eb611fdd0bb4aad6e32433f231b5394f317
Parents: c52bca5
Author: Claus Ibsen 
Authored: Wed Apr 12 20:57:41 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 20:58:27 2017 +0200

--
 .../src/main/java/org/apache/camel/impl/ConsumerCache.java   | 4 ++--
 .../src/main/java/org/apache/camel/impl/ProducerCache.java   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/33dd5eb6/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
index 20deb90..4cb8ef4 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
@@ -145,7 +145,7 @@ public class ConsumerCache extends ServiceSupport {
 LOG.debug("Released PollingConsumer: {} is stopped as 
consumer cache is full", endpoint);
 }
 ServiceHelper.stopAndShutdownService(pollingConsumer);
-} catch (Exception ex) {
+} catch (Throwable ex) {
 if (ex instanceof RuntimeCamelException) {
 throw (RuntimeCamelException)ex;
 } else {
@@ -171,7 +171,7 @@ public class ConsumerCache extends ServiceSupport {
 try {
 answer = endpoint.createPollingConsumer();
 answer.start();
-} catch (Exception e) {
+} catch (Throwable e) {
 throw new FailedToCreateConsumerException(endpoint, e);
 }
 if (pooled && answer instanceof ServicePoolAware) {

http://git-wip-us.apache.org/repos/asf/camel/blob/33dd5eb6/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
index bfd20f0..faa0f72 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
@@ -320,7 +320,7 @@ public class ProducerCache extends ServiceSupport {
 doneSync -> asyncDispatchExchange(endpoint, 
producer, resultProcessor,
 finalExchange, producerCallback));
 return false;
-} catch (Exception e) {
+} catch (Throwable e) {
 // populate failed so return
 innerExchange.setException(e);
 producerCallback.done(true);
@@ -575,7 +575,7 @@ public class ProducerCache extends ServiceSupport {
 // add as service which will also start the service
 // (false => we and handling the lifecycle of the producer in 
this cache)
 getCamelContext().addService(answer, false);
-} catch (Exception e) {
+} catch (Throwable e) {
 throw new FailedToCreateProducerException(endpoint, e);
 }
 



[3/6] camel git commit: [CAMEL-11139] ClassNotFoundException may silently be ignored in InProducer

2017-04-12 Thread davsclaus
[CAMEL-11139] ClassNotFoundException may silently be ignored in InProducer


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

Branch: refs/heads/camel-2.18.x
Commit: c52bca5e1b7c0ba7c9f1b8ec8ba22d05ad8dcc40
Parents: bb68f96
Author: Thomas Diesler 
Authored: Wed Apr 12 14:43:39 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 20:58:20 2017 +0200

--
 camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c52bca5e/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
index 1062029..bfd20f0 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
@@ -504,7 +504,7 @@ public class ProducerCache extends ServiceSupport {
 // lets populate using the processor callback
 try {
 processor.process(exchange);
-} catch (Exception e) {
+} catch (Throwable e) {
 // populate failed so return
 exchange.setException(e);
 return exchange;



[5/6] camel git commit: [CAMEL-11139] ClassNotFoundException may silently be ignored in InProducer

2017-04-12 Thread davsclaus
[CAMEL-11139] ClassNotFoundException may silently be ignored in InProducer


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

Branch: refs/heads/camel-2.17.x
Commit: c05d77633b1b1cc7720636011e66801c242bd93a
Parents: bd221e8
Author: Thomas Diesler 
Authored: Wed Apr 12 14:43:39 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 20:58:46 2017 +0200

--
 camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/c05d7763/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
index 9be2825..3a45e3e 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
@@ -387,7 +387,7 @@ public class ProducerCache extends ServiceSupport {
 // lets populate using the processor callback
 try {
 processor.process(exchange);
-} catch (Exception e) {
+} catch (Throwable e) {
 // populate failed so return
 exchange.setException(e);
 return exchange;



[6/6] camel git commit: CAMEL-11139: Catch throwable in other places and also in the consumer cache

2017-04-12 Thread davsclaus
CAMEL-11139: Catch throwable in other places and also in the consumer cache


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

Branch: refs/heads/camel-2.17.x
Commit: 96fc48c3ecce31843f1b47b9fef413a661349052
Parents: c05d776
Author: Claus Ibsen 
Authored: Wed Apr 12 20:57:41 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 20:59:55 2017 +0200

--
 .../src/main/java/org/apache/camel/impl/ConsumerCache.java   | 4 ++--
 .../src/main/java/org/apache/camel/impl/ProducerCache.java   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/96fc48c3/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
index 52e227f..87244f0 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
@@ -145,7 +145,7 @@ public class ConsumerCache extends ServiceSupport {
 LOG.debug("Released PollingConsumer: {} is stopped as 
consumer cache is full", endpoint);
 }
 ServiceHelper.stopAndShutdownService(pollingConsumer);
-} catch (Exception ex) {
+} catch (Throwable ex) {
 if (ex instanceof RuntimeCamelException) {
 throw (RuntimeCamelException)ex;
 } else {
@@ -171,7 +171,7 @@ public class ConsumerCache extends ServiceSupport {
 try {
 answer = endpoint.createPollingConsumer();
 answer.start();
-} catch (Exception e) {
+} catch (Throwable e) {
 throw new FailedToCreateConsumerException(endpoint, e);
 }
 if (pooled && answer instanceof ServicePoolAware) {

http://git-wip-us.apache.org/repos/asf/camel/blob/96fc48c3/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
index 3a45e3e..00936c2 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ProducerCache.java
@@ -440,7 +440,7 @@ public class ProducerCache extends ServiceSupport {
 // add as service which will also start the service
 // (false => we and handling the lifecycle of the producer in 
this cache)
 getCamelContext().addService(answer, false);
-} catch (Exception e) {
+} catch (Throwable e) {
 throw new FailedToCreateProducerException(endpoint, e);
 }
 



camel git commit: CAMEL-10650: adding general docs and new condition

2017-04-12 Thread nferraro
Repository: camel
Updated Branches:
  refs/heads/master f34fadb29 -> df1cda698


CAMEL-10650: adding general docs and new condition


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

Branch: refs/heads/master
Commit: df1cda698d125ab5ca75d9f34e1cb99ac7390b82
Parents: f34fadb
Author: Nicola Ferraro 
Authored: Wed Apr 12 15:37:40 2017 +0200
Committer: Nicola Ferraro 
Committed: Wed Apr 12 15:44:02 2017 +0200

--
 .../security/CamelSSLAutoConfiguration.java | 26 +++-
 .../CamelSSLConfigurationProperties.java| 13 
 .../security/CamelSSLAutoConfigurationTest.java | 68 
 .../boot/security/CamelSSLNoConfigTest.java | 53 +++
 .../en/camel-configuration-utilities.adoc   | 35 ++
 .../camel/component/jetty9/Jetty9SSLTest.java   |  3 +-
 .../http/springboot/Netty4HttpSSLTest.java  |  1 -
 .../component/undertow/UndertowSSLTest.java |  1 -
 8 files changed, 181 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/df1cda69/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfiguration.java
--
diff --git 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfiguration.java
 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfiguration.java
index 7479e82..d69e1a8 100644
--- 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfiguration.java
+++ 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLAutoConfiguration.java
@@ -16,19 +16,27 @@
  */
 package org.apache.camel.spring.boot.security;
 
+import java.util.Map;
+
 import org.apache.camel.spring.boot.CamelAutoConfiguration;
 import org.apache.camel.util.jsse.GlobalSSLContextParametersSupplier;
 import org.apache.camel.util.jsse.SSLContextParameters;
 import org.springframework.boot.autoconfigure.AutoConfigureBefore;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
+import org.springframework.boot.bind.RelaxedPropertyResolver;
 import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ConditionContext;
+import org.springframework.context.annotation.Conditional;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.core.type.AnnotatedTypeMetadata;
 
 @Configuration
 @AutoConfigureBefore(CamelAutoConfiguration.class)
 @EnableConfigurationProperties(CamelSSLConfigurationProperties.class)
-@ConditionalOnProperty(value = "camel.ssl.enabled")
+@Conditional(CamelSSLAutoConfiguration.Condition.class)
 public class CamelSSLAutoConfiguration {
 
 @Bean
@@ -37,4 +45,18 @@ public class CamelSSLAutoConfiguration {
 return () -> config;
 }
 
+public static class Condition extends SpringBootCondition {
+@Override
+public ConditionOutcome getMatchOutcome(ConditionContext context, 
AnnotatedTypeMetadata annotatedTypeMetadata) {
+RelaxedPropertyResolver resolver = new 
RelaxedPropertyResolver(context.getEnvironment(), "camel.ssl.config");
+Map sslProperties = resolver.getSubProperties(".");
+ConditionMessage.Builder message = 
ConditionMessage.forCondition("camel.ssl.config");
+if (sslProperties.size() > 0) {
+return ConditionOutcome.match(message.because("enabled"));
+}
+
+return ConditionOutcome.noMatch(message.because("not enabled"));
+}
+}
+
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/df1cda69/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLConfigurationProperties.java
--
diff --git 
a/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLConfigurationProperties.java
 
b/components/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/security/CamelSSLConfigurationProperties.java
index 7a5d6b6..2893b82 100644
--- 

svn commit: r1010328 - in /websites/production/camel/content: cache/main.pageCache camel-219-release.html

2017-04-12 Thread buildbot
Author: buildbot
Date: Wed Apr 12 13:19:21 2017
New Revision: 1010328

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-219-release.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/camel-219-release.html
==
--- websites/production/camel/content/camel-219-release.html (original)
+++ websites/production/camel/content/camel-219-release.html Wed Apr 12 
13:19:21 2017
@@ -91,7 +91,7 @@
 
 
 
-New and NoteworthyWelcome 
to the 2.19.0 release which approx XXX issues resolved (new features, 
improvements and bug fixes such as...)Introduced https://github.com/apache/camel/blob/master/connectors/camel-connector/src/main/docs/connector-component.adoc#connector-component;
 rel="nofollow">Camel Connector's which is a simplified version of a Camel 
component that has been pre-configured for a specific 
use-case.Upgraded to Spring Boot 1.5.x.The Camel Maven Plugin now provides the 
camel:validate goal to parse your Java and XML source code for any 
Camel routes and report invalid Camel endpoint uri and simple expression 
errors. You can run this at code time (not 
runtime).CamelMain andSpring Boot andCamel Maven Plugin can now auto 
terminate the JVM after Camel has been running for maximum duration of seconds, 
processed messages or been idle for a period.Camel source code can 
build with Java 9 in preparation for official support for Java 9 later this 
yearAll the Camel Spring Boot starter components now has more of the 
components default values included in their metadata which allows tooling to 
display such informationDeprecated more components and camel-core APIs 
that will be dropped in Camel 3.0 or sometime in the 
futureIntroducedReloadStrategyas SPI which 
allows custom providers to implement logic for triggering live reloads of Camel 
routes.TheCamel Maven Pluginnow allows to live 
reload route changes from XML files when running Camel. This can also be 
enabled from the Main class.
 Introduced a newcamel-catalog-restartifact which is a 
tiny standalone REST API of the CamelCatalog using JAX-RS and Swagger 
Annotations.Addedcamel-catalog-rest-appas a 
standalone application which used Apache CXF with Jetty to host the Catalog 
REST API with embedded Swagger 
UIReturningnullfromBean should work similar to 
howsetBodyandtransformworks 
when they set anullbody.The Camel Spring Boot 
starter components now have their auto configuration depends 
onorg.apache.camel.springboot.CamelAutoConfiguration which 
makes it easier writing unit tests where you can 
excludeorg.apache.camel.springboot.CamelAutoConfiguration to 
turn off Camel Spring Boot auto configuration completely.Camel now 
supports OWASP dependency check maven
  pluginNATScomponent now 
supports TLS andexplicit flushing (with timeout) of the 
connectionhttps://cwiki.apache.org/confluence/display/BOOKKEEPER/Metrics;>Metricscomponent
 now supports Gauge typeFileconsumer now supports idempotent-changed and 
idempotent-rename read lock strategies for clustering.Camel 
Catalog now supports custom runtime providers that only includes the supported 
Camel components, languages and data formats running in that container. For 
example for Karaf or Spring Boot in the camel-catalog-provider-karaf and 
camel-catalog-provider-springboot.Thehttps://cwiki.apache.org/confluence/display/WW/bean;>bean component 
will when calling a method that returned an instance of 
Callablenow call that callable to obtain the chained result. 
This allows to c
 all Groovy functions/closures etc.FailoverLoad Balancer with inheritErrorHandler=false, now 
allows Camel'sError Handler 
to react after the load balancer is exhausted.Salesforce component now supports limits, recent 
items, approvals and composite APIDumping Camel routes as XML now 
includes custom namespaces which are at xpath expressions etc. Likewise 
updating Camel routes from XML can now include namespaces which will be 
associated on xpath expressions.AddedRouteIdFactory 
which can auto assign route ids based on the consumer endpoints to use more 
sensitible names, instead of route1, route2, 
etc.Addskip function toSimple languageUpgraded to Jetty 9.3 (Jetty 9.2 
still supported for Karaf 4.0.x users)<
 li>RouteBuilder auto-configuration can now be disabled in Camel CDIAsynchronous support 
for CXF JAX-RS producers has been 
addedTheJSonPath language now supports Map and List types and 
POJOs as well. For POJOs you need to have Jackson on the 
classpath.Data Format which marshal to JSon or XML now set 
the content-type header to application/json or application/xml 
appropriately.TheKafka component can now store offset state offline 
(stateRepository) to preserve 

camel git commit: Add example modules to examples parent

2017-04-12 Thread gzurowski
Repository: camel
Updated Branches:
  refs/heads/master a3bbb2011 -> f34fadb29


Add example modules to examples parent

Signed-off-by: Gregor Zurowski 


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

Branch: refs/heads/master
Commit: f34fadb2971b86a7bd0e2df33c88f214fb44ab05
Parents: a3bbb20
Author: Gregor Zurowski 
Authored: Wed Apr 12 15:03:51 2017 +0200
Committer: Gregor Zurowski 
Committed: Wed Apr 12 15:04:06 2017 +0200

--
 examples/pom.xml | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f34fadb2/examples/pom.xml
--
diff --git a/examples/pom.xml b/examples/pom.xml
index 18a5b88..90403d3 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -64,6 +64,7 @@
 camel-example-jmx
 camel-example-jms-file
 camel-example-kafka
+camel-example-kotlin
 camel-example-loadbalancing
 camel-example-loan-broker-cxf
 camel-example-loan-broker-jms
@@ -78,6 +79,7 @@
 camel-example-reportincident
 camel-example-reportincident-wssecurity
 camel-example-rest-producer
+camel-example-rest-swagger
 camel-example-restlet-jdbc
 camel-example-route-throttling
 camel-example-scala



[1/4] camel git commit: CAMEL-11059: Remove example that was using spring-dm

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 4ec55a34e -> a3bbb2011


CAMEL-11059: Remove example that was using spring-dm


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

Branch: refs/heads/master
Commit: f562a6f588833f73ff7eb20e2f953c741bf6b424
Parents: 4ec55a3
Author: Claus Ibsen 
Authored: Wed Apr 12 14:46:02 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 14:46:02 2017 +0200

--
 examples/camel-example-box-osgi/README.md   |  70 ---
 examples/camel-example-box-osgi/pom.xml |  83 
 .../src/main/resources/META-INF/LICENSE.txt | 203 ---
 .../src/main/resources/META-INF/NOTICE.txt  |  11 -
 .../resources/META-INF/spring/camel-context.xml |  55 -
 .../src/test/resources/log4j2.properties|  23 ---
 examples/pom.xml|   1 -
 7 files changed, 446 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/f562a6f5/examples/camel-example-box-osgi/README.md
--
diff --git a/examples/camel-example-box-osgi/README.md 
b/examples/camel-example-box-osgi/README.md
deleted file mode 100644
index 337710c..000
--- a/examples/camel-example-box-osgi/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# Box.com OSGi Example
-
-### Introduction
-
-A simple example which sets up a camel route to upload files
-found in an `inbox` directory to a box.com account.
-
- Camel component used in this example
-
-* camel-spring-dm
-* camel-box
-
-### Build
-
-First you will need to compile the example:
-
-   mvn install
-
-### Run
-
-To run the example on Apache Karaf 4.x or newer
-
- Step 1
-
-Launch Karaf with:
-
-  bin/karaf
-
- Step 2
-
-Add features required into Karaf
-
-   feature:repo-add camel ${version}
-   feature:install camel-spring-dm
-   feature:install camel-box
-
- Step 3
-
-Create a `box.properties` file in the Karaf base directory with the following 
properties
-set to your box account credentials.
-
-box.userName=
-box.userPassword=
-box.clientId=
-box.clientSecret=
-
- Step 4
-
-Deploy the example into Karaf
-
-   install -s mvn:org.apache.camel/camel-example-box-osgi/${version}
-
- Step 5
-
-Copy files to the `inbox` directory in the Karaf base directory.
-
- Step 6
-
-Watch them get transferred to your box.com account.
-
-### Forum, Help, etc
-
-If you hit an problems please let us know on the Camel Forums
-   
-
-Please help us make Apache Camel better - we appreciate any feedback you may
-have.  Enjoy!
-
-
-The Camel riders!

http://git-wip-us.apache.org/repos/asf/camel/blob/f562a6f5/examples/camel-example-box-osgi/pom.xml
--
diff --git a/examples/camel-example-box-osgi/pom.xml 
b/examples/camel-example-box-osgi/pom.xml
deleted file mode 100644
index 5c12f27..000
--- a/examples/camel-example-box-osgi/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
-
-  4.0.0
-
-  
-org.apache.camel
-examples
-2.19.0-SNAPSHOT
-  
-
-  camel-example-box-osgi
-  Camel :: Example :: Box :: OSGi
-  An example which use a Box Endpoint in OSGi
-  jar
-
-  
-OSGi
-Box OSGi
-
-
-  org.apache.camel.example*
-
-  
-
-  
-
-  org.apache.camel
-  camel-core
-
-
-  org.apache.camel
-  camel-box
-
-
-
-
-  org.apache.logging.log4j
-  log4j-api
-  runtime
-
-
-  org.apache.logging.log4j
-  log4j-core
-  runtime
-
-
-  org.apache.logging.log4j
-  log4j-slf4j-impl
-  runtime
-
-
-
-
-  org.apache.camel
-  camel-test-spring
-  test
-
-
-  junit
-  junit
-  test
-
-  
-
-

http://git-wip-us.apache.org/repos/asf/camel/blob/f562a6f5/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt
--
diff --git 
a/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt 
b/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..000
--- a/examples/camel-example-box-osgi/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- 

[3/4] camel git commit: Polished

2017-04-12 Thread davsclaus
Polished


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

Branch: refs/heads/master
Commit: ab2ed8c356f038a52fe97f89764a2b82f3ec
Parents: 7a85395
Author: Claus Ibsen 
Authored: Wed Apr 12 14:56:34 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 14:56:34 2017 +0200

--
 .../src/main/java/org/apache/camel/component/file/FileEndpoint.java | 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/ab2ed8c3/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java 
b/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
index db5f140..8a1ed20 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/FileEndpoint.java
@@ -239,7 +239,6 @@ public class FileEndpoint extends GenericFileEndpoint 
{
 this.probeContentType = probeContentType;
 }
 
-
 public String getExtendedAttributes() {
 return extendedAttributes;
 }



[2/4] camel git commit: CAMEL-11059: Remove example that was using spring-dm

2017-04-12 Thread davsclaus
CAMEL-11059: Remove example that was using spring-dm


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

Branch: refs/heads/master
Commit: 7a8539553d4dc9486a2adba279150e222eb90983
Parents: f562a6f
Author: Claus Ibsen 
Authored: Wed Apr 12 14:46:37 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 14:46:37 2017 +0200

--
 examples/camel-example-spring-dm/README.md  |  48 -
 examples/camel-example-spring-dm/pom.xml| 106 --
 .../camel/example/osgi/MyRouteBuilder.java  |  46 -
 .../apache/camel/example/osgi/MyTransform.java  |  56 -
 .../src/main/resources/META-INF/LICENSE.txt | 203 ---
 .../src/main/resources/META-INF/NOTICE.txt  |  11 -
 .../resources/META-INF/spring/camelContext.xml  |  38 
 .../src/main/resources/features.xml |  26 ---
 examples/pom.xml|   1 -
 9 files changed, 535 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7a853955/examples/camel-example-spring-dm/README.md
--
diff --git a/examples/camel-example-spring-dm/README.md 
b/examples/camel-example-spring-dm/README.md
deleted file mode 100644
index bb40a8d..000
--- a/examples/camel-example-spring-dm/README.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Camel Spring-DM Example
-
-### Introduction
-
-This example shows how use Spring DM (OSGi) with Camel. It can be run using 
Maven.
-
-### Build
-You will need to compile this example first:
-
-   mvn install
-
-### Run from cmd line outside OSGi container
-To run the example using Maven type
-
-   mvn camel:run
-
-To stop the example hit ctrl+c
-
-### Run inside OSGi container
-You will need to compile and install this example first:
-
-   mvn install
-
-If using Apache Karaf / Apache ServiceMix you can install this example
-from the shell using this example's "features.xml" for easy provisioning.
-
-   feature:repo-add camel ${version}
-   feature:install camel
-   feature:repo-add 
mvn:org.apache.camel/camel-example-spring-dm/${version}/xml/features
-   feature:install camel-example-spring-dm
-
-The example outputs to the log, which you can see using
-
-   log:display
-
-... or you can tail the log with
-
-   log:tail
-
-And use ctrl+c to break the tail.
-
-### Forum, Help, etc
-
-If you hit an problems please let us know on the Camel Forums
-   
-
-Please help us make Apache Camel better - we appreciate any feedback you may
-have.  Enjoy!

http://git-wip-us.apache.org/repos/asf/camel/blob/7a853955/examples/camel-example-spring-dm/pom.xml
--
diff --git a/examples/camel-example-spring-dm/pom.xml 
b/examples/camel-example-spring-dm/pom.xml
deleted file mode 100644
index cba2a32..000
--- a/examples/camel-example-spring-dm/pom.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
-
-  4.0.0
-
-  
-org.apache.camel
-examples
-2.19.0-SNAPSHOT
-  
-
-  camel-example-spring-dm
-  jar
-  Camel :: Example :: Spring DM (deprecated)
-  A simple OSGi Spring DM example which creates a bundle that can 
be dropped into any OSGi container
-
-  
-OSGi
-Spring DM
-
-
org.apache.camel.example.osgi.*
-  
-
-  
-
-
-  org.apache.camel
-  camel-core
-
-
-  org.apache.camel
-  camel-spring
-
-
-
-
-  org.apache.logging.log4j
-  log4j-api
-  runtime
-
-
-  org.apache.logging.log4j
-  log4j-core
-  runtime
-
-
-  org.apache.logging.log4j
-  log4j-slf4j-impl
-  runtime
-
-
-  
-
-  
-
-  
-org.codehaus.mojo
-build-helper-maven-plugin
-
-  
-attach-artifacts
-package
-
-  attach-artifact
-
-
-  
-
-  target/classes/features.xml
-  xml
-  features
-
-  
-
-  
-
-  
-
-  
-  
-org.apache.camel
-camel-maven-plugin
-${project.version}
-  
-
-
-  
-
-

http://git-wip-us.apache.org/repos/asf/camel/blob/7a853955/examples/camel-example-spring-dm/src/main/java/org/apache/camel/example/osgi/MyRouteBuilder.java

[4/4] camel git commit: CAMEL-11059: Remove example that was using spring-dm

2017-04-12 Thread davsclaus
CAMEL-11059: Remove example that was using spring-dm


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

Branch: refs/heads/master
Commit: a3bbb2011283a42f50045d689ab9ad2433300037
Parents: ab2ed8c
Author: Claus Ibsen 
Authored: Wed Apr 12 14:56:50 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 14:56:50 2017 +0200

--
 examples/README.adoc | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a3bbb201/examples/README.adoc
--
diff --git a/examples/README.adoc b/examples/README.adoc
index 033e8b8..e9b2635 100644
--- a/examples/README.adoc
+++ b/examples/README.adoc
@@ -11,7 +11,7 @@ View the individual example READMEs for details.
 ### Examples
 
 // examples: START
-Number of Examples: 92 (10 deprecated)
+Number of Examples: 90 (9 deprecated)
 
 [width="100%",cols="4,2,4",options="header"]
 |===
@@ -133,8 +133,6 @@ Number of Examples: 92 (10 deprecated)
 
 | link:camel-example-spring-jms/README.md[Spring JMS] 
(camel-example-spring-jms) | Messaging | An example using Spring XML to talk to 
the JMS server from different kind of client techniques
 
-| link:camel-example-box-osgi/README.md[Box OSGi] (camel-example-box-osgi) | 
OSGi | An example which use a Box Endpoint in OSGi
-
 | link:camel-example-cdi-osgi/README.md[CDI OSGi] (camel-example-cdi-osgi) | 
OSGi | *deprecated* PAX CDI example
 
 | link:camel-example-cxf-blueprint/README.md[CXF Blueprint] 
(camel-example-cxf-blueprint) | OSGi | An example which use a CXF consumer and 
the OSGI HTTP Service
@@ -147,8 +145,6 @@ Number of Examples: 92 (10 deprecated)
 
 | link:camel-example-servlet-rest-blueprint/README.md[Servlet REST Blueprint] 
(camel-example-servlet-rest-blueprint) | OSGi | An example using Servlet REST 
with OSGi Blueprint
 
-| link:camel-example-spring-dm/README.md[Spring DM] (camel-example-spring-dm) 
| OSGi | *deprecated* A simple OSGi Spring DM example which creates a bundle 
that can be dropped into any OSGi container
-
 | link:camel-example-sql-blueprint/README.md[SQL Blueprint] 
(camel-example-sql-blueprint) | OSGi | An example for showing Camel using SQL 
component with blueprint
 
 | link:camel-example-ssh/README.md[SSH] (camel-example-ssh) | OSGi | A simple 
SSH example which creates a bundle that can be dropped into any OSGi container



[2/2] camel git commit: CAMEL-11059: Remove spring-dm from spring boot starter

2017-04-12 Thread davsclaus
CAMEL-11059: Remove spring-dm from spring boot starter


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

Branch: refs/heads/master
Commit: 4ec55a34ec57ebb6086b89c15f2c66dc2ceaa2b3
Parents: 2676994
Author: Claus Ibsen 
Authored: Wed Apr 12 14:43:32 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 14:43:32 2017 +0200

--
 .../camel-spring-dm-starter/pom.xml |  51 -
 .../src/main/resources/META-INF/LICENSE.txt | 203 ---
 .../src/main/resources/META-INF/NOTICE.txt  |  11 -
 .../src/main/resources/META-INF/spring.provides |  18 --
 .../spring-boot/components-starter/pom.xml  |   1 -
 .../maven/packaging/SpringBootStarterMojo.java  |   3 +-
 6 files changed, 1 insertion(+), 286 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/4ec55a34/platforms/spring-boot/components-starter/camel-spring-dm-starter/pom.xml
--
diff --git 
a/platforms/spring-boot/components-starter/camel-spring-dm-starter/pom.xml 
b/platforms/spring-boot/components-starter/camel-spring-dm-starter/pom.xml
deleted file mode 100644
index 4f6be0c..000
--- a/platforms/spring-boot/components-starter/camel-spring-dm-starter/pom.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
-  4.0.0
-  
-org.apache.camel
-components-starter
-2.19.0-SNAPSHOT
-  
-  camel-spring-dm-starter
-  jar
-  Spring-Boot Starter :: Camel :: Spring DM (deprecated)
-  Spring-Boot Starter for Camel Spring DM support
-  
-
-  org.springframework.boot
-  spring-boot-starter
-  ${spring-boot-version}
-
-
-  org.apache.camel
-  camel-spring-dm
-  ${project.version}
-
-
-
-  org.apache.camel
-  camel-core-starter
-
-
-  org.apache.camel
-  camel-spring-boot-starter
-
-
-  
-

http://git-wip-us.apache.org/repos/asf/camel/blob/4ec55a34/platforms/spring-boot/components-starter/camel-spring-dm-starter/src/main/resources/META-INF/LICENSE.txt
--
diff --git 
a/platforms/spring-boot/components-starter/camel-spring-dm-starter/src/main/resources/META-INF/LICENSE.txt
 
b/platforms/spring-boot/components-starter/camel-spring-dm-starter/src/main/resources/META-INF/LICENSE.txt
deleted file mode 100644
index 6b0b127..000
--- 
a/platforms/spring-boot/components-starter/camel-spring-dm-starter/src/main/resources/META-INF/LICENSE.txt
+++ /dev/null
@@ -1,203 +0,0 @@
-
- Apache License
-   Version 2.0, January 2004
-http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-  "License" shall mean the terms and conditions for use, reproduction,
-  and distribution as defined by Sections 1 through 9 of this document.
-
-  "Licensor" shall mean the copyright owner or entity authorized by
-  the copyright owner that is granting the License.
-
-  "Legal Entity" shall mean the union of the acting entity and all
-  other entities that control, are controlled by, or are under common
-  control with that entity. For the purposes of this definition,
-  "control" means (i) the power, direct or indirect, to cause the
-  direction or management of such entity, whether by contract or
-  otherwise, or (ii) ownership of fifty percent (50%) or more of the
-  outstanding shares, or (iii) beneficial ownership of such entity.
-
-  "You" (or "Your") shall mean an individual or Legal Entity
-  exercising permissions granted by this License.
-
-  "Source" form shall mean the preferred form for making modifications,
-  including but not limited to software source code, documentation
-  source, and configuration files.
-
-  "Object" form shall mean any form resulting from mechanical
-  transformation or translation of a Source form, including but
-  not limited to compiled object code, generated documentation,
-  and conversions to other media types.
-
-  "Work" shall mean the work of authorship, whether in Source or
-  Object form, made available under the License, as indicated by a
-  copyright notice that is included in or attached to the work
-  (an example is provided in the Appendix below).
-
-  "Derivative Works" shall mean 

[1/2] camel git commit: CAMEL-11059: camel-spring-dm - Should be removed. For 2.19.x its disabled, and then we can remove it in next release.

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 7910e79ed -> 4ec55a34e


CAMEL-11059: camel-spring-dm - Should be removed. For 2.19.x its disabled, and 
then we can remove it in next release.


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

Branch: refs/heads/master
Commit: 2676994718e70d4bd14a83e1a5b48784a334b7c4
Parents: 7910e79
Author: Claus Ibsen 
Authored: Wed Apr 12 13:48:52 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 13:48:52 2017 +0200

--
 platforms/karaf/features/src/main/resources/features.xml | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/26769947/platforms/karaf/features/src/main/resources/features.xml
--
diff --git a/platforms/karaf/features/src/main/resources/features.xml 
b/platforms/karaf/features/src/main/resources/features.xml
index eec9fe5..cada7e2 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -58,13 +58,17 @@
 camel-core
 mvn:org.apache.camel/camel-spring/${project.version}
   
+  
   
+camel-scr is deprecated. Consider using blueprint 
instead
 camel-core
 scr
 eventadmin
@@ -287,7 +291,7 @@
 mvn:org.apache.camel/camel-castor/${project.version}
   
   
-camel-cdi in OSGi is deprecated. camel-cdi requires that either 
pax-cdi-weld or pax-cdi-openwebbeans has been installed
+camel-cdi in OSGi is deprecated. Use blueprint instead. camel-cdi 
requires that either pax-cdi-weld or pax-cdi-openwebbeans has been 
installed
 camel-core
 pax-cdi
 eventadmin



camel git commit: CAMEL-11049: Camel maven plugin for generating custom component / data format / language list should detect if its from Apache Camel vs custom and act accordingly.

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 7d2fb2115 -> 7910e79ed


CAMEL-11049: Camel maven plugin for generating custom component / data format / 
language list should detect if its from Apache Camel vs custom and act 
accordingly.


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

Branch: refs/heads/master
Commit: 7910e79ed0d33422ab9303b087c2592d75955f06
Parents: 7d2fb21
Author: Claus Ibsen 
Authored: Wed Apr 12 13:30:34 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 13:30:34 2017 +0200

--
 .../apache/camel/maven/packaging/PackageDataFormatMojo.java | 5 -
 .../apache/camel/maven/packaging/PackageLanguageMojo.java   | 9 ++---
 2 files changed, 10 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7910e79e/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
--
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
index 3509ac0..2a4d029 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageDataFormatMojo.java
@@ -144,10 +144,13 @@ public class PackageDataFormatMojo extends AbstractMojo {
 }
 }
 
+// is this from Apache Camel then the data format is out of the box 
and we should enrich the json schema with more details
+boolean apacheCamel = "org.apache.camel".equals(project.getGroupId());
+
 // find camel-core and grab the data format model from there, and 
enrich this model with information from this artifact
 // and create json schema model file for this data format
 try {
-if (count > 0) {
+if (apacheCamel && count > 0) {
 Artifact camelCore = findCamelCoreArtifact(project);
 if (camelCore != null) {
 File core = camelCore.getFile();

http://git-wip-us.apache.org/repos/asf/camel/blob/7910e79e/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
--
diff --git 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
index 9dc618d..e6ff6d2 100644
--- 
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
+++ 
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PackageLanguageMojo.java
@@ -144,10 +144,13 @@ public class PackageLanguageMojo extends AbstractMojo {
 }
 }
 
-// find camel-core and grab the data format model from there, and 
enrich this model with information from this artifact
-// and create json schema model file for this data format
+// is this from Apache Camel then the data format is out of the box 
and we should enrich the json schema with more details
+boolean apacheCamel = "org.apache.camel".equals(project.getGroupId());
+
+// find camel-core and grab the language model from there, and enrich 
this model with information from this artifact
+// and create json schema model file for this language
 try {
-if (count > 0) {
+if (apacheCamel && count > 0) {
 Artifact camelCore = findCamelCoreArtifact(project);
 if (camelCore != null) {
 File core = camelCore.getFile();



camel git commit: CAMEL-11088: camel-swagger-java: schema objects in definitions could not be referenced. Make that code line the same as in 2.18.x branch.

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x 54a67b00c -> bd221e8b8


CAMEL-11088: camel-swagger-java: schema objects in definitions could not be 
referenced. Make that code line the same as in 2.18.x branch.


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

Branch: refs/heads/camel-2.17.x
Commit: bd221e8b870e7922a65976225388320710a97e67
Parents: 54a67b0
Author: Claus Ibsen 
Authored: Wed Apr 12 13:03:41 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 13:03:41 2017 +0200

--
 .../src/main/java/org/apache/camel/swagger/RestSwaggerReader.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bd221e8b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
--
diff --git 
a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
 
b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
index f5e1b63..577733a 100644
--- 
a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
+++ 
b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
@@ -512,7 +512,7 @@ public class RestSwaggerReader {
 if (swagger.getDefinitions() != null && 
swagger.getDefinitions().get(entry.getKey()) != null) {
 Model oldModel = swagger.getDefinitions().get(entry.getKey());
 if (oldModel.getVendorExtensions() != null && 
!oldModel.getVendorExtensions().isEmpty()) {
-oldExt = oldModel.getVendorExtensions().get("x-className") 
== null;
+oldExt = oldModel.getVendorExtensions().get("x-className") 
!= null;
 }
 }
 



[1/5] camel git commit: CAMEL-11135: fixed model

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/camel-2.17.x cfb25cde1 -> 54a67b00c
  refs/heads/camel-2.18.x 6886c0bba -> bb68f9659
  refs/heads/master 19fa67a64 -> 7d2fb2115


CAMEL-11135: fixed model


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

Branch: refs/heads/master
Commit: 7d2fb2115dff484ca6cbd44ff1df66777cd803da
Parents: ee14787
Author: Claus Ibsen 
Authored: Wed Apr 12 12:58:23 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 12:58:32 2017 +0200

--
 .../org/apache/camel/model/dataformat/ProtobufDataFormat.java| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7d2fb211/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
index 1d1146b1..cde7b29 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
@@ -79,6 +79,10 @@ public class ProtobufDataFormat extends DataFormatDefinition 
{
 this.contentTypeFormat = contentTypeFormat;
 }
 
+public String getContentTypeFormat() {
+return contentTypeFormat;
+}
+
 public Object getDefaultInstance() {
 return defaultInstance;
 }



[3/5] camel git commit: CAMEL-11138: ConsumerTemplate - If cache is full then polling consumer should be stopped to not leak resources

2017-04-12 Thread davsclaus
CAMEL-11138: ConsumerTemplate - If cache is full then polling consumer should 
be stopped to not leak resources


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

Branch: refs/heads/camel-2.18.x
Commit: bb68f96597e82eacdfafc54ec8fe3fa849c6b191
Parents: 6886c0b
Author: Claus Ibsen 
Authored: Wed Apr 12 12:58:08 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 12:58:59 2017 +0200

--
 .../org/apache/camel/impl/ConsumerCache.java| 11 +++-
 .../impl/ConsumerCacheZeroCapacityTest.java | 59 
 2 files changed, 68 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bb68f965/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
index 2e6fdda..20deb90 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
@@ -134,9 +134,16 @@ public class ConsumerCache extends ServiceSupport {
 if (pollingConsumer instanceof IsSingleton) {
 singleton = ((IsSingleton) pollingConsumer).isSingleton();
 }
-if (!singleton) {
+String key = endpoint.getEndpointUri();
+boolean cached = consumers.containsKey(key);
+if (!singleton || !cached) {
 try {
-// stop and shutdown non-singleton producers as we should 
not leak resources
+// stop and shutdown non-singleton/non-cached consumers as 
we should not leak resources
+if (!singleton) {
+LOG.debug("Released PollingConsumer: {} is stopped as 
consumer is not singleton", endpoint);
+} else {
+LOG.debug("Released PollingConsumer: {} is stopped as 
consumer cache is full", endpoint);
+}
 ServiceHelper.stopAndShutdownService(pollingConsumer);
 } catch (Exception ex) {
 if (ex instanceof RuntimeCamelException) {

http://git-wip-us.apache.org/repos/asf/camel/blob/bb68f965/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
new file mode 100644
index 000..3cbf2d4
--- /dev/null
+++ 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.impl;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Endpoint;
+import org.apache.camel.PollingConsumer;
+
+/**
+ * @version 
+ */
+public class ConsumerCacheZeroCapacityTest extends ContextTestSupport {
+
+public void testConsumerCacheZeroCapacity() throws Exception {
+ConsumerCache cache = new ConsumerCache(this, context, 0);
+cache.start();
+
+assertEquals("Size should be 0", 0, cache.size());
+
+Endpoint endpoint = 
context.getEndpoint("file:target/foo?fileName=foo.txt");
+PollingConsumer consumer = cache.acquirePollingConsumer(endpoint);
+assertNotNull(consumer);
+assertEquals("Started", ((org.apache.camel.support.ServiceSupport) 
consumer).getStatus().name());
+
+// let it run a poll
+consumer.receive(1000);
+
+boolean found = 
Thread.getAllStackTraces().keySet().stream().anyMatch(t -> 
t.getName().contains("target/foo"));
+

[5/5] camel git commit: CAMEL-11138: Remove java 8 stuff as this is java 7

2017-04-12 Thread davsclaus
CAMEL-11138: Remove java 8 stuff as this is java 7


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

Branch: refs/heads/camel-2.17.x
Commit: 54a67b00ca700ed73c6c9fb7ab6410629818e999
Parents: 2e069c9
Author: Claus Ibsen 
Authored: Wed Apr 12 12:59:58 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 12:59:58 2017 +0200

--
 .../org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java  | 7 ---
 1 file changed, 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/54a67b00/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
index 3cbf2d4..49c5c83 100644
--- 
a/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
@@ -39,9 +39,6 @@ public class ConsumerCacheZeroCapacityTest extends 
ContextTestSupport {
 // let it run a poll
 consumer.receive(1000);
 
-boolean found = 
Thread.getAllStackTraces().keySet().stream().anyMatch(t -> 
t.getName().contains("target/foo"));
-assertTrue("Should find file consumer thread", found);
-
 cache.releasePollingConsumer(endpoint, consumer);
 
 // takes a little to stop
@@ -49,10 +46,6 @@ public class ConsumerCacheZeroCapacityTest extends 
ContextTestSupport {
 
 assertEquals("Stopped", ((org.apache.camel.support.ServiceSupport) 
consumer).getStatus().name());
 
-// should not be a file consumer thread
-found = Thread.getAllStackTraces().keySet().stream().anyMatch(t -> 
t.getName().contains("target/foo"));
-assertFalse("Should not find file consumer thread", found);
-
 cache.stop();
 }
 



[2/5] camel git commit: CAMEL-11138: ConsumerTemplate - If cache is full then polling consumer should be stopped to not leak resources

2017-04-12 Thread davsclaus
CAMEL-11138: ConsumerTemplate - If cache is full then polling consumer should 
be stopped to not leak resources


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

Branch: refs/heads/master
Commit: ee147873016dcf719eaa1c405f2a095905d30bdc
Parents: 19fa67a
Author: Claus Ibsen 
Authored: Wed Apr 12 12:58:08 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 12:58:32 2017 +0200

--
 .../org/apache/camel/impl/ConsumerCache.java| 11 +++-
 .../impl/ConsumerCacheZeroCapacityTest.java | 59 
 2 files changed, 68 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/ee147873/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
index 2e6fdda..20deb90 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
@@ -134,9 +134,16 @@ public class ConsumerCache extends ServiceSupport {
 if (pollingConsumer instanceof IsSingleton) {
 singleton = ((IsSingleton) pollingConsumer).isSingleton();
 }
-if (!singleton) {
+String key = endpoint.getEndpointUri();
+boolean cached = consumers.containsKey(key);
+if (!singleton || !cached) {
 try {
-// stop and shutdown non-singleton producers as we should 
not leak resources
+// stop and shutdown non-singleton/non-cached consumers as 
we should not leak resources
+if (!singleton) {
+LOG.debug("Released PollingConsumer: {} is stopped as 
consumer is not singleton", endpoint);
+} else {
+LOG.debug("Released PollingConsumer: {} is stopped as 
consumer cache is full", endpoint);
+}
 ServiceHelper.stopAndShutdownService(pollingConsumer);
 } catch (Exception ex) {
 if (ex instanceof RuntimeCamelException) {

http://git-wip-us.apache.org/repos/asf/camel/blob/ee147873/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
new file mode 100644
index 000..3cbf2d4
--- /dev/null
+++ 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.impl;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Endpoint;
+import org.apache.camel.PollingConsumer;
+
+/**
+ * @version 
+ */
+public class ConsumerCacheZeroCapacityTest extends ContextTestSupport {
+
+public void testConsumerCacheZeroCapacity() throws Exception {
+ConsumerCache cache = new ConsumerCache(this, context, 0);
+cache.start();
+
+assertEquals("Size should be 0", 0, cache.size());
+
+Endpoint endpoint = 
context.getEndpoint("file:target/foo?fileName=foo.txt");
+PollingConsumer consumer = cache.acquirePollingConsumer(endpoint);
+assertNotNull(consumer);
+assertEquals("Started", ((org.apache.camel.support.ServiceSupport) 
consumer).getStatus().name());
+
+// let it run a poll
+consumer.receive(1000);
+
+boolean found = 
Thread.getAllStackTraces().keySet().stream().anyMatch(t -> 
t.getName().contains("target/foo"));
+

[4/5] camel git commit: CAMEL-11138: ConsumerTemplate - If cache is full then polling consumer should be stopped to not leak resources

2017-04-12 Thread davsclaus
CAMEL-11138: ConsumerTemplate - If cache is full then polling consumer should 
be stopped to not leak resources


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

Branch: refs/heads/camel-2.17.x
Commit: 2e069c9935d25f71b283d18a7c7d756a76da6b09
Parents: cfb25cd
Author: Claus Ibsen 
Authored: Wed Apr 12 12:58:08 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 12:59:17 2017 +0200

--
 .../org/apache/camel/impl/ConsumerCache.java| 11 +++-
 .../impl/ConsumerCacheZeroCapacityTest.java | 59 
 2 files changed, 68 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/2e069c99/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
--
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java 
b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
index 399012c..52e227f 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ConsumerCache.java
@@ -134,9 +134,16 @@ public class ConsumerCache extends ServiceSupport {
 if (pollingConsumer instanceof IsSingleton) {
 singleton = ((IsSingleton) pollingConsumer).isSingleton();
 }
-if (!singleton) {
+String key = endpoint.getEndpointUri();
+boolean cached = consumers.containsKey(key);
+if (!singleton || !cached) {
 try {
-// stop and shutdown non-singleton producers as we should 
not leak resources
+// stop and shutdown non-singleton/non-cached consumers as 
we should not leak resources
+if (!singleton) {
+LOG.debug("Released PollingConsumer: {} is stopped as 
consumer is not singleton", endpoint);
+} else {
+LOG.debug("Released PollingConsumer: {} is stopped as 
consumer cache is full", endpoint);
+}
 ServiceHelper.stopAndShutdownService(pollingConsumer);
 } catch (Exception ex) {
 if (ex instanceof RuntimeCamelException) {

http://git-wip-us.apache.org/repos/asf/camel/blob/2e069c99/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
--
diff --git 
a/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
new file mode 100644
index 000..3cbf2d4
--- /dev/null
+++ 
b/camel-core/src/test/java/org/apache/camel/impl/ConsumerCacheZeroCapacityTest.java
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.impl;
+
+import org.apache.camel.ContextTestSupport;
+import org.apache.camel.Endpoint;
+import org.apache.camel.PollingConsumer;
+
+/**
+ * @version 
+ */
+public class ConsumerCacheZeroCapacityTest extends ContextTestSupport {
+
+public void testConsumerCacheZeroCapacity() throws Exception {
+ConsumerCache cache = new ConsumerCache(this, context, 0);
+cache.start();
+
+assertEquals("Size should be 0", 0, cache.size());
+
+Endpoint endpoint = 
context.getEndpoint("file:target/foo?fileName=foo.txt");
+PollingConsumer consumer = cache.acquirePollingConsumer(endpoint);
+assertNotNull(consumer);
+assertEquals("Started", ((org.apache.camel.support.ServiceSupport) 
consumer).getStatus().name());
+
+// let it run a poll
+consumer.receive(1000);
+
+boolean found = 
Thread.getAllStackTraces().keySet().stream().anyMatch(t -> 
t.getName().contains("target/foo"));
+

[1/2] camel git commit: Polish example

2017-04-12 Thread gzurowski
Repository: camel
Updated Branches:
  refs/heads/master 5fa7a8a4b -> 19fa67a64


Polish example

Signed-off-by: Gregor Zurowski 


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

Branch: refs/heads/master
Commit: 19fa67a64410d90b428998d33598891094567aad
Parents: 1612ede
Author: Gregor Zurowski 
Authored: Wed Apr 12 11:24:24 2017 +0200
Committer: Gregor Zurowski 
Committed: Wed Apr 12 11:26:07 2017 +0200

--
 .../src/main/java/sample/camel/PetController.java | 14 --
 .../src/main/java/sample/camel/RestRoute.java |  2 +-
 2 files changed, 9 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/19fa67a6/examples/camel-example-rest-producer/src/main/java/sample/camel/PetController.java
--
diff --git 
a/examples/camel-example-rest-producer/src/main/java/sample/camel/PetController.java
 
b/examples/camel-example-rest-producer/src/main/java/sample/camel/PetController.java
index d9bb346..71c1802 100644
--- 
a/examples/camel-example-rest-producer/src/main/java/sample/camel/PetController.java
+++ 
b/examples/camel-example-rest-producer/src/main/java/sample/camel/PetController.java
@@ -16,8 +16,11 @@
  */
 package sample.camel;
 
+import java.util.Collections;
+import java.util.Map;
+
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 /**
@@ -28,15 +31,14 @@ public class PetController {
 
 private static final String[] PETS = new String[]{"Snoopy", "Fido", "Tony 
the Tiger"};
 
-@RequestMapping(value = "/petById/{id}", produces = "application/json")
-public String petById(@PathVariable("id") Integer id) {
+@GetMapping(value = "/pets/{id}")
+public Map petById(@PathVariable("id") Integer id) {
 if (id != null && id > 0 && id <= PETS.length + 1) {
 int index = id - 1;
 String pet = PETS[index];
-return String.format("{ \"name\": \"%s\" }", pet);
+return Collections.singletonMap("name", pet);
 } else {
-// empty pet
-return "{ }";
+return Collections.emptyMap();
 }
 }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/19fa67a6/examples/camel-example-rest-producer/src/main/java/sample/camel/RestRoute.java
--
diff --git 
a/examples/camel-example-rest-producer/src/main/java/sample/camel/RestRoute.java
 
b/examples/camel-example-rest-producer/src/main/java/sample/camel/RestRoute.java
index dc2b2f8..72fb2ea 100644
--- 
a/examples/camel-example-rest-producer/src/main/java/sample/camel/RestRoute.java
+++ 
b/examples/camel-example-rest-producer/src/main/java/sample/camel/RestRoute.java
@@ -34,7 +34,7 @@ public class RestRoute extends RouteBuilder {
 
 from("timer:hello?period={{timer.period}}")
 .setHeader("id", simple("${random(1,3)}"))
-.to("rest:get:petById/{id}")
+.to("rest:get:pets/{id}")
 .log("${body}");
 }
 



[2/2] camel git commit: Add camel-example-rest-producer module to parent

2017-04-12 Thread gzurowski
Add camel-example-rest-producer module to parent

Signed-off-by: Gregor Zurowski 


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

Branch: refs/heads/master
Commit: 1612ede904703da70f0afc2971e166cbc46ae4c7
Parents: 5fa7a8a
Author: Gregor Zurowski 
Authored: Wed Apr 12 11:05:49 2017 +0200
Committer: Gregor Zurowski 
Committed: Wed Apr 12 11:26:07 2017 +0200

--
 examples/pom.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/1612ede9/examples/pom.xml
--
diff --git a/examples/pom.xml b/examples/pom.xml
index bb82380..ed0a3ad 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -78,6 +78,7 @@
 camel-example-reload
 camel-example-reportincident
 camel-example-reportincident-wssecurity
+camel-example-rest-producer
 camel-example-restlet-jdbc
 camel-example-route-throttling
 camel-example-scala



svn commit: r1010310 - in /websites/production/camel/content: cache/main.pageCache camel-219-release.html

2017-04-12 Thread buildbot
Author: buildbot
Date: Wed Apr 12 09:18:57 2017
New Revision: 1010310

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-219-release.html

Modified: websites/production/camel/content/cache/main.pageCache
==
Binary files - no diff available.

Modified: websites/production/camel/content/camel-219-release.html
==
--- websites/production/camel/content/camel-219-release.html (original)
+++ websites/production/camel/content/camel-219-release.html Wed Apr 12 
09:18:57 2017
@@ -91,7 +91,7 @@
 
 
 
-New and NoteworthyWelcome 
to the 2.19.0 release which approx XXX issues resolved (new features, 
improvements and bug fixes such as...)Introduced https://github.com/apache/camel/blob/master/connectors/camel-connector/src/main/docs/connector-component.adoc#connector-component;
 rel="nofollow">Camel Connector's which is a simplified version of a Camel 
component that has been pre-configured for a specific 
use-case.Upgraded to Spring Boot 1.5.x.The Camel Maven Plugin now provides the 
camel:validate goal to parse your Java and XML source code for any 
Camel routes and report invalid Camel endpoint uri and simple expression 
errors. You can run this at code time (not 
runtime).CamelMain andSpring Boot andCamel Maven Plugin can now auto 
terminate the JVM after Camel has been running for maximum duration of seconds, 
processed messages or been idle for a period.Camel source code can 
build with Java 9 in preparation for official support for Java 9 later this 
yearAll the Camel Spring Boot starter components now has more of the 
components default values included in their metadata which allows tooling to 
display such informationDeprecated more components and camel-core APIs 
that will be dropped in Camel 3.0 or sometime in the 
futureIntroducedReloadStrategyas SPI which 
allows custom providers to implement logic for triggering live reloads of Camel 
routes.TheCamel Maven Pluginnow allows to live 
reload route changes from XML files when running Camel. This can also be 
enabled from the Main class.
 Introduced a newcamel-catalog-restartifact which is a 
tiny standalone REST API of the CamelCatalog using JAX-RS and Swagger 
Annotations.Addedcamel-catalog-rest-appas a 
standalone application which used Apache CXF with Jetty to host the Catalog 
REST API with embedded Swagger 
UIReturningnullfromBean should work similar to 
howsetBodyandtransformworks 
when they set anullbody.The Camel Spring Boot 
starter components now have their auto configuration depends 
onorg.apache.camel.springboot.CamelAutoConfiguration which 
makes it easier writing unit tests where you can 
excludeorg.apache.camel.springboot.CamelAutoConfiguration to 
turn off Camel Spring Boot auto configuration completely.Camel now 
supports OWASP dependency check maven
  pluginNATScomponent now 
supports TLS andexplicit flushing (with timeout) of the 
connectionhttps://cwiki.apache.org/confluence/display/BOOKKEEPER/Metrics;>Metricscomponent
 now supports Gauge typeFileconsumer now supports idempotent-changed and 
idempotent-rename read lock strategies for clustering.Camel 
Catalog now supports custom runtime providers that only includes the supported 
Camel components, languages and data formats running in that container. For 
example for Karaf or Spring Boot in the camel-catalog-provider-karaf and 
camel-catalog-provider-springboot.Thehttps://cwiki.apache.org/confluence/display/WW/bean;>bean component 
will when calling a method that returned an instance of 
Callablenow call that callable to obtain the chained result. 
This allows to c
 all Groovy functions/closures etc.FailoverLoad Balancer with inheritErrorHandler=false, now 
allows Camel'sError Handler 
to react after the load balancer is exhausted.Salesforce component now supports limits, recent 
items, approvals and composite APIDumping Camel routes as XML now 
includes custom namespaces which are at xpath expressions etc. Likewise 
updating Camel routes from XML can now include namespaces which will be 
associated on xpath expressions.AddedRouteIdFactory 
which can auto assign route ids based on the consumer endpoints to use more 
sensitible names, instead of route1, route2, 
etc.Addskip function toSimple languageUpgraded to Jetty 9.3 (Jetty 9.2 
still supported for Karaf 4.0.x users)<
 li>RouteBuilder auto-configuration can now be disabled in Camel CDIAsynchronous support 
for CXF JAX-RS producers has been 
addedTheJSonPath language now supports Map and List types and 
POJOs as well. For POJOs you need to have Jackson on the 
classpath.Data Format which marshal to JSon or XML now set 
the content-type header to application/json or application/xml 
appropriately.TheKafka component can now store offset state offline 
(stateRepository) to preserve 

camel git commit: HeaderSelectorProducer to support suppliers for header key and default value

2017-04-12 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master b7df95775 -> 5fa7a8a4b


HeaderSelectorProducer to support suppliers for header key and default value


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

Branch: refs/heads/master
Commit: 5fa7a8a4b23b51a9f7226adf83f322600103dc32
Parents: b7df957
Author: lburgazzoli 
Authored: Wed Apr 12 11:11:37 2017 +0200
Committer: lburgazzoli 
Committed: Wed Apr 12 11:11:45 2017 +0200

--
 .../camel/impl/HeaderSelectorProducer.java  | 40 +++-
 1 file changed, 31 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/5fa7a8a4/camel-core/src/main/java/org/apache/camel/impl/HeaderSelectorProducer.java
--
diff --git 
a/camel-core/src/main/java/org/apache/camel/impl/HeaderSelectorProducer.java 
b/camel-core/src/main/java/org/apache/camel/impl/HeaderSelectorProducer.java
index 09d59c6..f91f032 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/HeaderSelectorProducer.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/HeaderSelectorProducer.java
@@ -20,6 +20,7 @@ import java.lang.reflect.Method;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.function.Supplier;
 
 import org.apache.camel.Endpoint;
 import org.apache.camel.Exchange;
@@ -28,6 +29,7 @@ import org.apache.camel.InvokeOnHeaders;
 import org.apache.camel.Message;
 import org.apache.camel.NoSuchHeaderException;
 import org.apache.camel.Processor;
+import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -38,28 +40,43 @@ import org.slf4j.LoggerFactory;
 public class HeaderSelectorProducer extends BaseSelectorProducer {
 private static final Logger LOGGER = 
LoggerFactory.getLogger(HeaderSelectorProducer.class);
 
-private final String header;
-private final String defaultHeaderValue;
+private final Supplier headerSupplier;
+private final Supplier defaultHeaderValueSupplier;
 private final Object target;
 private Map handlers;
 
+public HeaderSelectorProducer(Endpoint endpoint, Supplier 
headerSupplier) {
+this(endpoint, headerSupplier, () -> null, null);
+}
 public HeaderSelectorProducer(Endpoint endpoint, String header) {
-this(endpoint, header, null, null);
+this(endpoint, () -> header, () -> null, null);
 }
 
 public HeaderSelectorProducer(Endpoint endpoint, String header, Object 
target) {
-this(endpoint, header, null, target);
+this(endpoint, () -> header, () -> null, target);
+}
+
+public HeaderSelectorProducer(Endpoint endpoint,  Supplier 
headerSupplier, Object target) {
+this(endpoint, headerSupplier, () -> null, target);
 }
 
 public HeaderSelectorProducer(Endpoint endpoint, String header, String 
defaultHeaderValue) {
-this(endpoint, header, defaultHeaderValue, null);
+this(endpoint, () -> header, () -> defaultHeaderValue, null);
+}
+
+public HeaderSelectorProducer(Endpoint endpoint, Supplier 
headerSupplier, Supplier defaultHeaderValueSupplier) {
+this(endpoint, headerSupplier, defaultHeaderValueSupplier, null);
 }
 
 public HeaderSelectorProducer(Endpoint endpoint, String header, String 
defaultHeaderValue, Object target) {
+this(endpoint, () -> header, () -> defaultHeaderValue, target);
+}
+
+public HeaderSelectorProducer(Endpoint endpoint, Supplier 
headerSupplier, Supplier defaultHeaderValueSupplier, Object target) {
 super(endpoint);
 
-this.header = header;
-this.defaultHeaderValue = defaultHeaderValue;
+this.headerSupplier = ObjectHelper.notNull(headerSupplier, 
"headerSupplier");
+this.defaultHeaderValueSupplier = 
ObjectHelper.notNull(defaultHeaderValueSupplier, "defaultHeaderValueSupplier");
 this.target = target != null ? target : this;
 this.handlers = new HashMap<>();
 }
@@ -84,7 +101,12 @@ public class HeaderSelectorProducer extends 
BaseSelectorProducer {
 
 @Override
 protected Processor getProcessor(Exchange exchange) throws Exception {
-final String action = exchange.getIn().getHeader(header, 
defaultHeaderValue, String.class);
+String header = headerSupplier.get();
+String action = exchange.getIn().getHeader(headerSupplier.get(), 
String.class);
+
+if (action == null) {
+action = defaultHeaderValueSupplier.get();
+}
 if (action == null) {
 throw new 

[01/18] camel git commit: Remove query parameters from URI

2017-04-12 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master 586f9409d -> b7df95775


Remove query parameters from URI


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

Branch: refs/heads/master
Commit: 89333ca5d7ebdd045d4ec6ae5bdbb4b3135d8995
Parents: 60d1e3d
Author: Jens Reimann 
Authored: Wed Apr 12 08:48:58 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:26 2017 +0200

--
 .../org/apache/camel/component/milo/server/MiloServerEndpoint.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/89333ca5/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
index 6abacf2..7045286 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/server/MiloServerEndpoint.java
@@ -30,7 +30,7 @@ import org.apache.camel.spi.UriPath;
 /**
  * OPC UA Server based endpoint
  */
-@UriEndpoint(scheme = "milo-server", syntax = "milo-server:itemId[?options]", 
title = "OPC UA Server", consumerClass = MiloServerConsumer.class, label = 
"iot")
+@UriEndpoint(scheme = "milo-server", syntax = "milo-server:itemId", title = 
"OPC UA Server", consumerClass = MiloServerConsumer.class, label = "iot")
 class MiloServerEndpoint extends DefaultEndpoint {
 
@UriPath



[16/18] camel git commit: Fix a bunch of other checkstyle violations

2017-04-12 Thread acosentino
Fix a bunch of other checkstyle violations


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

Branch: refs/heads/master
Commit: 839453f85b8aefb24195eb7d9881b9f15b2b5410
Parents: 942f160
Author: Jens Reimann 
Authored: Wed Apr 12 09:59:16 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:27 2017 +0200

--
 .../milo/client/MiloClientConnection.java   |  2 +-
 .../milo/client/MiloClientEndpoint.java |  4 +-
 .../client/MiloClientItemConfiguration.java |  6 +-
 .../client/internal/SubscriptionManager.java| 80 ++--
 .../milo/server/MiloServerComponent.java| 39 +-
 .../milo/server/MiloServerConsumer.java |  2 +-
 .../milo/server/MiloServerEndpoint.java |  2 +-
 .../milo/server/MiloServerProducer.java |  2 +-
 .../component/milo/testing/Application.java |  6 +-
 .../milo/testing/Application2Client.java|  6 +-
 .../milo/testing/Application2Server.java|  5 +-
 11 files changed, 82 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/839453f8/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConnection.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConnection.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConnection.java
index ec3d569..b521b0b 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConnection.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConnection.java
@@ -74,7 +74,7 @@ public class MiloClientConnection implements AutoCloseable {
 
 @FunctionalInterface
 public interface MonitorHandle {
-public void unregister();
+void unregister();
 }
 
 public MonitorHandle monitorValue(final MiloClientItemConfiguration 
configuration, final Consumer valueConsumer) {

http://git-wip-us.apache.org/repos/asf/camel/blob/839453f8/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
index 7826389..34a4148 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientEndpoint.java
@@ -30,7 +30,7 @@ import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriPath;
 import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
 
-@UriEndpoint(scheme = "milo-client", syntax = 
"milo-client:tcp://user:password@host:port/path/to/service?itemId=item.id=urn:foo:bar",
 title = "Milo based OPC UA Client", consumerClass = MiloClientConsumer.class, 
label = "iot")
+@UriEndpoint(scheme = "milo-client", syntax = 
"milo-client:tcp://user:password@host:port/path/to/service", title = "Milo 
based OPC UA Client", consumerClass = MiloClientConsumer.class, label = "iot")
 public class MiloClientEndpoint extends DefaultEndpoint implements 
MiloClientItemConfiguration {
 
 /**
@@ -62,7 +62,7 @@ public class MiloClientEndpoint extends DefaultEndpoint 
implements MiloClientIte
  * Default "await" setting for writes
  */
 @UriParam
-private boolean defaultAwaitWrites = false;
+private boolean defaultAwaitWrites;
 
 private final MiloClientConnection connection;
 private final MiloClientComponent component;

http://git-wip-us.apache.org/repos/asf/camel/blob/839453f8/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientItemConfiguration.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientItemConfiguration.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientItemConfiguration.java
index 2468449..5e7954d 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientItemConfiguration.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientItemConfiguration.java
@@ -20,9 +20,9 @@ import 

[12/18] camel git commit: Doc re-write by maven build

2017-04-12 Thread acosentino
Doc re-write by maven build


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

Branch: refs/heads/master
Commit: a867b3c82d040bf40e8b1907c74629b0c6194bab
Parents: 10c10a7
Author: Jens Reimann 
Authored: Wed Apr 12 09:30:53 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:27 2017 +0200

--
 .../src/main/docs/milo-client-component.adoc| 110 ++-
 .../src/main/docs/milo-server-component.adoc|  91 ---
 2 files changed, 106 insertions(+), 95 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a867b3c8/components/camel-milo/src/main/docs/milo-client-component.adoc
--
diff --git a/components/camel-milo/src/main/docs/milo-client-component.adoc 
b/components/camel-milo/src/main/docs/milo-client-component.adoc
index f1585cf..4b8d342 100644
--- a/components/camel-milo/src/main/docs/milo-client-component.adoc
+++ b/components/camel-milo/src/main/docs/milo-client-component.adoc
@@ -1,7 +1,8 @@
-[[MiloClient-MiloClientComponent]]
+## Milo based OPC UA Client Component
 
-Milo Client Component
-~~~
+*Available as of Camel version *
+
+### Milo Client Component
 
 *Available as of Camel 2.19*
 
@@ -25,26 +26,25 @@ for this component:
 
 
 // component options: START
-The Milo based OPC UA Client component supports 5 options which are listed 
below.
+The Milo based OPC UA Client component supports 6 options which are listed 
below.
 
 
 
-[width="100%",cols="2s,1m,8",options="header"]
+[width="100%",cols="2,5,^1,2",options="header"]
 |===
-| Name | Java Type | Description
-| defaultConfiguration | MiloClientConfiguration | All default options for 
client
-| applicationName | String | Default application name
-| applicationUri | String | Default application URI
-| productUri | String | Default product URI
-| reconnectTimeout | Long | Default reconnect timeout
+| Name | Description | Default | Type
+| **defaultConfiguration** (common) | All default options for client |  | 
MiloClientConfiguration
+| **applicationName** (common) | Default application name |  | String
+| **applicationUri** (common) | Default application URI |  | String
+| **productUri** (common) | Default product URI |  | String
+| **reconnectTimeout** (common) | Default reconnect timeout |  | Long
+| **resolveProperty Placeholders** (advanced) | Whether the component should 
resolve property placeholders on itself when starting. Only properties which 
are of String type can use property placeholders. | true | boolean
 |===
 // component options: END
 
 
 
-[[MiloClient-URIformat]]
-URI format
-^^
+### URI format
 
 The URI syntax of the endpoint is: 
 
@@ -61,9 +61,7 @@ 
milo-client:tcp://[user:password@]host:port?node=RAW(nsu=urn:foo:bar;s=item-1)
 
 If no user credentials are provided the client will switch to anonymous mode.
 
-[[MiloClient-URIOptions]]
-URI options
-^^^
+### URI options
 
 All configuration options in the group +client+ are applicable to the shared 
client instance. Endpoints
 will share client instances for each endpoint URI. So the first time a request 
for that endpoint URI is
@@ -85,38 +83,48 @@ In other words, shared connections located by the 
combination of endpoint URI an
 
 
 // endpoint options: START
-The Milo based OPC UA Client component supports 27 endpoint options which are 
listed below:
+The Milo based OPC UA Client endpoint is configured using URI syntax:
 
-[width="100%",cols="2s,1,1m,1m,5",options="header"]
+
milo-client:tcp://user:password@host:port/path/to/service?itemId=item.id=urn:foo:bar
+
+with the following path and query parameters:
+
+ Path Parameters (1 parameters):
+
+[width="100%",cols="2,5,^1,2",options="header"]
 |===
-| Name | Group | Default | Java Type | Description
-| endpointUri | common |  | String | *Required* The OPC UA server endpoint
-| clientId | common |  | String | A virtual client id to force the creation of 
a new connection instance
-| defaultAwaitWrites | common | false | boolean | Default await setting for 
writes
-| namespaceIndex | common |  | Integer | The namespace as numeric index 
deprecated
-| namespaceUri | common |  | String | The namespace as URI deprecated
-| node | common |  | ExpandedNodeId | The node definition (see Node ID)
-| nodeId | common |  | String | The node ID as string ID deprecated
-| samplingInterval | 

[08/18] camel git commit: Fix license headers

2017-04-12 Thread acosentino
Fix license headers


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

Branch: refs/heads/master
Commit: 976a08fb4db046ebc32fd00231f9ec13e097fba0
Parents: 8021165
Author: Jens Reimann 
Authored: Wed Apr 12 09:16:49 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:26 2017 +0200

--
 .../component/milo/AbstractMiloServerTest.java  | 16 
 .../milo/MonitorItemMultiConnectionsCertTest.java   | 16 
 .../milo/MonitorItemMultiConnectionsTest.java   | 16 
 .../camel/component/milo/MonitorItemTest.java   | 16 
 .../org/apache/camel/component/milo/NodeIdTest.java | 16 
 .../component/milo/converter/ConverterTest.java | 16 
 .../component/milo/server/ServerLocalTest.java  | 16 
 .../server/ServerSetCertificateManagerTest.java | 16 
 .../milo/server/ServerSetSecurityPoliciesTest.java  | 16 
 9 files changed, 72 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/976a08fb/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
--
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
index 818b36d..a904de4 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
@@ -1,11 +1,12 @@
-/*
- * Copyright (C) 2016 Jens Reimann  and others
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.component.milo;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/camel/blob/976a08fb/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
--
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
index aecc2ec..24f3c79 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/MonitorItemMultiConnectionsCertTest.java
@@ -1,11 +1,12 @@
-/*
- * Copyright (C) 2016 Jens Reimann  and others
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,7 +14,6 @@
  * See the License for the specific 

[06/18] camel git commit: Update copyright header

2017-04-12 Thread acosentino
Update copyright header


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

Branch: refs/heads/master
Commit: bc7974decc1cad14ba5b833ea69b2140bab5fd38
Parents: 7b3837f
Author: Jens Reimann 
Authored: Mon Apr 10 15:51:56 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:26 2017 +0200

--
 .../apache/camel/component/milo/KeyStoreLoader.java | 16 
 .../org/apache/camel/component/milo/Messages.java   | 16 
 .../apache/camel/component/milo/NamespaceId.java| 16 
 .../apache/camel/component/milo/PartialNodeId.java  | 16 
 .../component/milo/client/MiloClientComponent.java  | 16 
 .../milo/client/MiloClientConfiguration.java| 16 
 .../component/milo/client/MiloClientConnection.java | 16 
 .../component/milo/client/MiloClientConsumer.java   | 16 
 .../component/milo/client/MiloClientEndpoint.java   | 16 
 .../milo/client/MiloClientItemConfiguration.java| 16 
 .../component/milo/client/MiloClientProducer.java   | 16 
 .../milo/client/internal/SubscriptionManager.java   | 16 
 .../camel/component/milo/client/package-info.java   | 16 
 .../component/milo/converter/ValueConverter.java| 16 
 .../component/milo/converter/package-info.java  | 16 
 .../apache/camel/component/milo/package-info.java   | 16 
 .../component/milo/server/MiloServerComponent.java  | 16 
 .../component/milo/server/MiloServerConsumer.java   | 16 
 .../component/milo/server/MiloServerEndpoint.java   | 16 
 .../component/milo/server/MiloServerProducer.java   | 16 
 .../milo/server/internal/CamelNamespace.java| 16 
 .../milo/server/internal/CamelServerItem.java   | 16 
 .../camel/component/milo/server/package-info.java   | 16 
 .../camel/component/milo/testing/Application.java   | 16 
 .../component/milo/testing/Application2Client.java  | 16 
 .../component/milo/testing/Application2Server.java  | 16 
 26 files changed, 216 insertions(+), 200 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/bc7974de/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
index 1df24ee..fa1f970 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
@@ -1,11 +1,12 @@
-/*
- * Copyright (C) 2016 Jens Reimann 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
+ *  http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -13,7 +14,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.camel.component.milo;
 
 import java.io.IOException;

http://git-wip-us.apache.org/repos/asf/camel/blob/bc7974de/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java
index 8383d7c..f696fda 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/Messages.java
+++ 

[07/18] camel git commit: Remove deprecated stuff

2017-04-12 Thread acosentino
Remove deprecated stuff


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

Branch: refs/heads/master
Commit: 60d1e3d0c460620891f9d75752f72cb95c0f8146
Parents: 976a08f
Author: Jens Reimann 
Authored: Wed Apr 12 08:48:00 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:26 2017 +0200

--
 .../apache/camel/component/milo/NodeIds.java| 222 +++
 .../milo/client/MiloClientEndpoint.java |  64 --
 .../milo/server/MiloServerComponent.java|  16 --
 .../milo/server/MiloServerEndpoint.java |   7 -
 .../MonitorItemMultiConnectionsCertTest.java|  12 +-
 .../milo/MonitorItemMultiConnectionsTest.java   |   9 +-
 .../camel/component/milo/MonitorItemTest.java   |   3 +-
 .../apache/camel/component/milo/NodeIdTest.java |   8 -
 .../camel/component/milo/WriteClientTest.java   |  32 ++-
 9 files changed, 247 insertions(+), 126 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/60d1e3d0/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
new file mode 100644
index 000..1f61ebb
--- /dev/null
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/NodeIds.java
@@ -0,0 +1,222 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.milo;
+
+import java.util.Base64;
+import java.util.Objects;
+import java.util.UUID;
+
+import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
+
+/**
+ * Helper class to work with node IDs
+ */
+public final class NodeIds {
+   private NodeIds() {
+   }
+
+   /**
+* Create an attribute value for the "node" attribute
+* 
+* @param namespace
+*the namespace to use
+* @param node
+*the node ID
+* @return the value ready to append to a "node" URI attribute
+*/
+   public static String nodeValue(final String namespace, final String 
node) {
+   Objects.requireNonNull(namespace);
+   Objects.requireNonNull(node);
+
+   final StringBuilder builder = new StringBuilder("RAW(");
+   appendNamespace(builder, namespace);
+   builder.append(';');
+   appendNodeId(builder, node);
+   builder.append(')');
+   return builder.toString();
+   }
+
+   /**
+* Create an attribute value for the "node" attribute
+* 
+* @param namespace
+*the namespace to use
+* @param node
+*the node ID
+* @return the value ready to append to a "node" URI attribute
+*/
+   public static String nodeValue(final String namespace, final int node) {
+   Objects.requireNonNull(namespace);
+
+   final StringBuilder builder = new StringBuilder("RAW(");
+   appendNamespace(builder, namespace);
+   builder.append(';');
+   appendNodeId(builder, node);
+   builder.append(')');
+   return builder.toString();
+   }
+
+   /**
+* Create an attribute value for the "node" attribute
+* 
+* @param namespace
+*the namespace to use
+* @param node
+*the node ID
+* @return the value ready to append to a "node" URI attribute
+*/
+   public static String nodeValue(final String namespace, final UUID node) 
{
+   Objects.requireNonNull(namespace);
+   Objects.requireNonNull(node);
+
+   final 

[02/18] camel git commit: Fix Camel version in docs

2017-04-12 Thread acosentino
Fix Camel version in docs


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

Branch: refs/heads/master
Commit: 47a90192424eee99540293f7b247c503b9bc884f
Parents: bc7974d
Author: Jens Reimann 
Authored: Mon Apr 10 16:16:47 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:26 2017 +0200

--
 components/camel-milo/src/main/docs/milo-client.adoc | 2 +-
 components/camel-milo/src/main/docs/milo-server.adoc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/47a90192/components/camel-milo/src/main/docs/milo-client.adoc
--
diff --git a/components/camel-milo/src/main/docs/milo-client.adoc 
b/components/camel-milo/src/main/docs/milo-client.adoc
index 60dfbcf..f1585cf 100644
--- a/components/camel-milo/src/main/docs/milo-client.adoc
+++ b/components/camel-milo/src/main/docs/milo-client.adoc
@@ -3,7 +3,7 @@
 Milo Client Component
 ~~~
 
-*Available as of Camel 2.18*
+*Available as of Camel 2.19*
 
 The *Milo Client* component provides access to OPC UA servers using the
 http://eclipse.org/milo[Eclipse Milo™] implementation.

http://git-wip-us.apache.org/repos/asf/camel/blob/47a90192/components/camel-milo/src/main/docs/milo-server.adoc
--
diff --git a/components/camel-milo/src/main/docs/milo-server.adoc 
b/components/camel-milo/src/main/docs/milo-server.adoc
index 3f699f6..6c86c10 100644
--- a/components/camel-milo/src/main/docs/milo-server.adoc
+++ b/components/camel-milo/src/main/docs/milo-server.adoc
@@ -3,7 +3,7 @@
 Eclipse Milo Server Component
 ~~~
 
-*Available as of Camel 2.18*
+*Available as of Camel 2.19*
 
 The *Milo Server* component provides an OPC UA server using the
 http://eclipse.org/milo[Eclipse Milo™] implementation.



[14/18] camel git commit: Apply code formatter

2017-04-12 Thread acosentino
http://git-wip-us.apache.org/repos/asf/camel/blob/19db14d7/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/internal/SubscriptionManager.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/internal/SubscriptionManager.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/internal/SubscriptionManager.java
index fb2e396..0350987 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/internal/SubscriptionManager.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/internal/SubscriptionManager.java
@@ -68,503 +68,492 @@ import org.slf4j.LoggerFactory;
 
 public class SubscriptionManager {
 
-   private final static Logger LOG = 
LoggerFactory.getLogger(SubscriptionManager.class);
+private final static Logger LOG = 
LoggerFactory.getLogger(SubscriptionManager.class);
 
-   private final AtomicLong clientHandleCounter = new AtomicLong(0);
+private final AtomicLong clientHandleCounter = new AtomicLong(0);
 
-   private final class SubscriptionListenerImpl implements 
SubscriptionListener {
-   @Override
-   public void onSubscriptionTransferFailed(final UaSubscription 
subscription, final StatusCode statusCode) {
-   LOG.info("Transfer failed {} : {}", 
subscription.getSubscriptionId(), statusCode);
+private final class SubscriptionListenerImpl implements 
SubscriptionListener {
+@Override
+public void onSubscriptionTransferFailed(final UaSubscription 
subscription, final StatusCode statusCode) {
+LOG.info("Transfer failed {} : {}", 
subscription.getSubscriptionId(), statusCode);
 
-   // we simply tear it down and build it up again
-   handleConnectionFailue(new 
RuntimeException("Subscription failed to reconnect"));
-   }
-
-   @Override
-   public void onStatusChanged(final UaSubscription subscription, 
final StatusCode status) {
-   LOG.info("Subscription status changed {} : {}", 
subscription.getSubscriptionId(), status);
-   }
+// we simply tear it down and build it up again
+handleConnectionFailue(new RuntimeException("Subscription failed 
to reconnect"));
+}
 
-   @Override
-   public void onPublishFailure(final UaException exception) {
-   }
+@Override
+public void onStatusChanged(final UaSubscription subscription, final 
StatusCode status) {
+LOG.info("Subscription status changed {} : {}", 
subscription.getSubscriptionId(), status);
+}
 
-   @Override
-   public void onNotificationDataLost(final UaSubscription 
subscription) {
-   }
+@Override
+public void onPublishFailure(final UaException exception) {
+}
 
-   @Override
-   public void onKeepAlive(final UaSubscription subscription, 
final DateTime publishTime) {
-   }
-   }
+@Override
+public void onNotificationDataLost(final UaSubscription subscription) {
+}
 
-   public interface Worker {
-   public void work(T on) throws Exception;
-   }
+@Override
+public void onKeepAlive(final UaSubscription subscription, final 
DateTime publishTime) {
+}
+}
 
-   private static class Subscription {
-   private final NamespaceId namespaceId;
-   private final PartialNodeId partialNodeId;
-   private final Double samplingInterval;
+public interface Worker {
+public void work(T on) throws Exception;
+}
 
-   private final Consumer valueConsumer;
+private static class Subscription {
+private final NamespaceId namespaceId;
+private final PartialNodeId partialNodeId;
+private final Double samplingInterval;
 
-   public Subscription(final NamespaceId namespaceId, final 
PartialNodeId partialNodeId,
-   final Double samplingInterval, final 
Consumer valueConsumer) {
-   this.namespaceId = namespaceId;
-   this.partialNodeId = partialNodeId;
-   this.samplingInterval = samplingInterval;
-   this.valueConsumer = valueConsumer;
-   }
+private final Consumer valueConsumer;
 
-   public NamespaceId getNamespaceId() {
-   return this.namespaceId;
-   }
+public Subscription(final NamespaceId namespaceId, final PartialNodeId 
partialNodeId, final Double samplingInterval, final Consumer 
valueConsumer) {
+this.namespaceId = namespaceId;
+this.partialNodeId = 

[04/18] camel git commit: Initial import of Camel Milo

2017-04-12 Thread acosentino
http://git-wip-us.apache.org/repos/asf/camel/blob/7b3837fa/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/package-info.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/package-info.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/package-info.java
new file mode 100644
index 000..cf9ef60
--- /dev/null
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2016 Jens Reimann 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Client functionality
+ */
+package org.apache.camel.component.milo.client;

http://git-wip-us.apache.org/repos/asf/camel/blob/7b3837fa/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/ValueConverter.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/ValueConverter.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/ValueConverter.java
new file mode 100644
index 000..eaf178b
--- /dev/null
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/ValueConverter.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2016 Jens Reimann 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.component.milo.converter;
+
+import org.apache.camel.Converter;
+import org.apache.camel.TypeConverters;
+import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue;
+import org.eclipse.milo.opcua.stack.core.types.builtin.Variant;
+
+@Converter
+public final class ValueConverter implements TypeConverters {
+   private ValueConverter() {
+   }
+
+   @Converter
+   public static Variant toVariant(final DataValue value) {
+   return value.getValue();
+   }
+
+   @Converter
+   public static DataValue toDataValue(final Variant value) {
+   return new DataValue(value);
+   }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7b3837fa/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/package-info.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/package-info.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/package-info.java
new file mode 100644
index 000..7e5e94c
--- /dev/null
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/converter/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Data conversion
+ */
+package org.apache.camel.component.milo.converter;
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/7b3837fa/components/camel-milo/src/main/java/org/apache/camel/component/milo/package-info.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/package-info.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/package-info.java
new file mode 100644
index 000..7d99602
--- /dev/null
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2016 Jens Reimann 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * 

[15/18] camel git commit: Apply code formatter

2017-04-12 Thread acosentino
Apply code formatter


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

Branch: refs/heads/master
Commit: 19db14d76cb74533c06e610c1593c13348bdd9c0
Parents: 0f35f55
Author: Jens Reimann 
Authored: Wed Apr 12 09:37:23 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:27 2017 +0200

--
 .../camel/component/milo/KeyStoreLoader.java| 216 +++--
 .../apache/camel/component/milo/Messages.java   |  26 +-
 .../camel/component/milo/NamespaceId.java   | 112 +--
 .../apache/camel/component/milo/NodeIds.java| 368 ---
 .../camel/component/milo/PartialNodeId.java | 164 ++--
 .../milo/client/MiloClientComponent.java| 290 +++---
 .../milo/client/MiloClientConfiguration.java| 486 +-
 .../milo/client/MiloClientConnection.java   | 178 ++--
 .../milo/client/MiloClientConsumer.java |  84 +-
 .../milo/client/MiloClientEndpoint.java | 283 +++---
 .../client/MiloClientItemConfiguration.java |   6 +-
 .../milo/client/MiloClientProducer.java |  41 +-
 .../client/internal/SubscriptionManager.java| 957 +--
 .../milo/converter/ValueConverter.java  |  20 +-
 .../component/milo/converter/package-info.java  |   2 +-
 .../milo/server/MiloServerComponent.java| 735 +++---
 .../milo/server/MiloServerConsumer.java |  66 +-
 .../milo/server/MiloServerEndpoint.java | 104 +-
 .../milo/server/MiloServerProducer.java |  20 +-
 .../milo/server/internal/CamelNamespace.java| 296 +++---
 .../milo/server/internal/CamelServerItem.java   | 202 ++--
 .../component/milo/AbstractMiloServerTest.java  | 101 +-
 .../MonitorItemMultiConnectionsCertTest.java| 169 ++--
 .../milo/MonitorItemMultiConnectionsTest.java   |  97 +-
 .../camel/component/milo/MonitorItemTest.java   |  87 +-
 .../apache/camel/component/milo/NodeIdTest.java | 106 +-
 .../camel/component/milo/WriteClientTest.java   | 236 ++---
 .../component/milo/converter/ConverterTest.java |  38 +-
 .../component/milo/server/ServerLocalTest.java  |  80 +-
 .../server/ServerSetCertificateManagerTest.java |  27 +-
 .../server/ServerSetSecurityPoliciesTest.java   |  40 +-
 .../component/milo/testing/Application.java |  61 +-
 .../milo/testing/Application2Client.java|  45 +-
 .../milo/testing/Application2Server.java|  63 +-
 34 files changed, 2865 insertions(+), 2941 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/19db14d7/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
index fa1f970..b745bb7 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/KeyStoreLoader.java
@@ -30,116 +30,114 @@ import java.security.cert.X509Certificate;
 import java.util.NoSuchElementException;
 
 public class KeyStoreLoader {
-   public static final String DEFAULT_KEY_STORE_TYPE = "PKCS12";
+public static final String DEFAULT_KEY_STORE_TYPE = "PKCS12";
 
-   private String type = DEFAULT_KEY_STORE_TYPE;
-   private URL url;
-   private String keyStorePassword;
-   private String keyPassword;
-   private String keyAlias;
-
-   public static class Result {
+private String type = DEFAULT_KEY_STORE_TYPE;
+private URL url;
+private String keyStorePassword;
+private String keyPassword;
+private String keyAlias;
 
-   private final X509Certificate certificate;
-   private final KeyPair keyPair;
-
-   public Result(final X509Certificate certificate, final KeyPair 
keyPair) {
-   this.certificate = certificate;
-   this.keyPair = keyPair;
-   }
-
-   public X509Certificate getCertificate() {
-   return this.certificate;
-   }
-
-   public KeyPair getKeyPair() {
-   return this.keyPair;
-   }
-   }
-
-   public KeyStoreLoader() {
-   }
-
-   public void setType(final String type) {
-   this.type = type != null ? type : DEFAULT_KEY_STORE_TYPE;
-   }
-
-   public String getType() {
-   return this.type;
-   }
-
-   public void setUrl(final URL url) {
-   

[13/18] camel git commit: Apply code formatter

2017-04-12 Thread acosentino
http://git-wip-us.apache.org/repos/asf/camel/blob/19db14d7/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
--
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
index a904de4..40115d2 100644
--- 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/AbstractMiloServerTest.java
@@ -28,63 +28,62 @@ import 
org.eclipse.milo.opcua.stack.core.types.builtin.DataValue;
 
 public abstract class AbstractMiloServerTest extends CamelTestSupport {
 
-   public static void testBody(final AssertionClause clause, final 
Consumer valueConsumer) {
-   testBody(clause, DataValue.class, valueConsumer);
-   }
+public static void testBody(final AssertionClause clause, final 
Consumer valueConsumer) {
+testBody(clause, DataValue.class, valueConsumer);
+}
 
-   public static  void testBody(final AssertionClause clause, final 
Class bodyClass,
-   final Consumer valueConsumer) {
-   clause.predicate(exchange -> {
-   final T body = exchange.getIn().getBody(bodyClass);
-   valueConsumer.accept(body);
-   return true;
-   });
-   }
+public static  void testBody(final AssertionClause clause, final 
Class bodyClass, final Consumer valueConsumer) {
+clause.predicate(exchange -> {
+final T body = exchange.getIn().getBody(bodyClass);
+valueConsumer.accept(body);
+return true;
+});
+}
 
-   public static Consumer assertGoodValue(final Object 
expectedValue) {
-   return value -> {
-   assertNotNull(value);
-   assertEquals(expectedValue, 
value.getValue().getValue());
-   assertTrue(value.getStatusCode().isGood());
-   assertFalse(value.getStatusCode().isBad());
-   };
-   }
+public static Consumer assertGoodValue(final Object 
expectedValue) {
+return value -> {
+assertNotNull(value);
+assertEquals(expectedValue, value.getValue().getValue());
+assertTrue(value.getStatusCode().isGood());
+assertFalse(value.getStatusCode().isBad());
+};
+}
 
-   @Override
-   protected CamelContext createCamelContext() throws Exception {
-   final CamelContext context = super.createCamelContext();
-   configureContext(context);
-   return context;
-   }
+@Override
+protected CamelContext createCamelContext() throws Exception {
+final CamelContext context = super.createCamelContext();
+configureContext(context);
+return context;
+}
 
-   protected void configureContext(final CamelContext context) throws 
Exception {
-   final MiloServerComponent server = 
context.getComponent("milo-server", MiloServerComponent.class);
-   configureMiloServer(server);
-   }
+protected void configureContext(final CamelContext context) throws 
Exception {
+final MiloServerComponent server = context.getComponent("milo-server", 
MiloServerComponent.class);
+configureMiloServer(server);
+}
 
-   protected void configureMiloServer(final MiloServerComponent server) 
throws Exception {
-   server.setBindAddresses("localhost");
-   server.setBindPort(12685);
-   server.setUserAuthenticationCredentials("foo:bar,foo2:bar2");
-   }
+protected void configureMiloServer(final MiloServerComponent server) 
throws Exception {
+server.setBindAddresses("localhost");
+server.setBindPort(12685);
+server.setUserAuthenticationCredentials("foo:bar,foo2:bar2");
+}
 
-   /**
-* Create a default key store for testing
-*
-* @return always returns a key store
-*/
-   protected KeyStoreLoader.Result loadDefaultTestKey() {
-   try {
+/**
+ * Create a default key store for testing
+ *
+ * @return always returns a key store
+ */
+protected KeyStoreLoader.Result loadDefaultTestKey() {
+try {
 
-   final KeyStoreLoader loader = new KeyStoreLoader();
-   loader.setUrl("file:src/test/resources/cert/cert.p12");
-   loader.setKeyStorePassword("pwd1");
-   loader.setKeyPassword("pwd1");
-   return loader.load();
-   } catch (final GeneralSecurityException | IOException e) {
-   throw new RuntimeException(e);
-  

[03/18] camel git commit: Initial import of Camel Milo

2017-04-12 Thread acosentino
http://git-wip-us.apache.org/repos/asf/camel/blob/7b3837fa/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerLocalTest.java
--
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerLocalTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerLocalTest.java
new file mode 100644
index 000..84b16f9
--- /dev/null
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerLocalTest.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2016 Jens Reimann  and others
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.component.milo.server;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.eclipse.milo.opcua.stack.core.types.builtin.DataValue;
+import org.eclipse.milo.opcua.stack.core.types.builtin.Variant;
+import org.junit.Test;
+
+/**
+ * Unit tests for milo server component without using an actual connection
+ */
+public class ServerLocalTest extends CamelTestSupport {
+
+   private static final String MILO_ITEM_1 = "milo-server:myitem1";
+
+   private static final String MOCK_TEST = "mock:test";
+
+   @EndpointInject(uri = MOCK_TEST)
+   protected MockEndpoint testEndpoint;
+
+   @Override
+   protected RoutesBuilder createRouteBuilder() throws Exception {
+   return new RouteBuilder() {
+   @Override
+   public void configure() throws Exception {
+   from(MILO_ITEM_1).to(MOCK_TEST);
+   }
+   };
+   }
+
+   @Test
+   public void shouldStartComponent() {
+   }
+
+   @Test
+   public void testAcceptVariantString() {
+   sendBody(MILO_ITEM_1, new Variant("Foo"));
+   }
+
+   @Test
+   public void testAcceptVariantDouble() {
+   sendBody(MILO_ITEM_1, new Variant(0.0));
+   }
+
+   @Test
+   public void testAcceptString() {
+   sendBody(MILO_ITEM_1, "Foo");
+   }
+
+   @Test
+   public void testAcceptDouble() {
+   sendBody(MILO_ITEM_1, 0.0);
+   }
+
+   @Test
+   public void testAcceptDataValueString() {
+   sendBody(MILO_ITEM_1, new DataValue(new Variant("Foo")));
+   }
+
+   @Test
+   public void testAcceptDataValueDouble() {
+   sendBody(MILO_ITEM_1, new DataValue(new Variant(0.0)));
+   }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7b3837fa/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerSetCertificateManagerTest.java
--
diff --git 
a/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerSetCertificateManagerTest.java
 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerSetCertificateManagerTest.java
new file mode 100644
index 000..c2677a2
--- /dev/null
+++ 
b/components/camel-milo/src/test/java/org/apache/camel/component/milo/server/ServerSetCertificateManagerTest.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2016 Jens Reimann  and others
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.camel.component.milo.server;
+
+import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import org.apache.camel.component.milo.AbstractMiloServerTest;
+import org.junit.Test;
+
+/**
+ * Test setting the certificate manager
+ */
+public class 

[17/18] camel git commit: Code generated by maven build

2017-04-12 Thread acosentino
Code generated by maven build


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

Branch: refs/heads/master
Commit: 0f35f553c9ec911e22ed7afd82d741465ab14a04
Parents: a867b3c
Author: Jens Reimann 
Authored: Wed Apr 12 09:32:10 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:27 2017 +0200

--
 .../MiloClientComponentAutoConfiguration.java   | 111 +++
 .../MiloClientComponentConfiguration.java   | 300 +++
 .../MiloServerComponentAutoConfiguration.java   | 111 +++
 .../MiloServerComponentConfiguration.java   | 277 +
 ...dditional-spring-configuration-metadata.json |  16 +
 .../main/resources/META-INF/spring.factories|  21 ++
 6 files changed, 836 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/0f35f553/platforms/spring-boot/components-starter/camel-milo-starter/src/main/java/org/apache/camel/component/milo/client/springboot/MiloClientComponentAutoConfiguration.java
--
diff --git 
a/platforms/spring-boot/components-starter/camel-milo-starter/src/main/java/org/apache/camel/component/milo/client/springboot/MiloClientComponentAutoConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-milo-starter/src/main/java/org/apache/camel/component/milo/client/springboot/MiloClientComponentAutoConfiguration.java
new file mode 100644
index 000..36e6961
--- /dev/null
+++ 
b/platforms/spring-boot/components-starter/camel-milo-starter/src/main/java/org/apache/camel/component/milo/client/springboot/MiloClientComponentAutoConfiguration.java
@@ -0,0 +1,111 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.milo.client.springboot;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.milo.client.MiloClientComponent;
+import org.apache.camel.util.IntrospectionSupport;
+import org.springframework.boot.autoconfigure.AutoConfigureAfter;
+import org.springframework.boot.autoconfigure.condition.ConditionMessage;
+import org.springframework.boot.autoconfigure.condition.ConditionOutcome;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import 
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.autoconfigure.condition.SpringBootCondition;
+import org.springframework.boot.bind.RelaxedPropertyResolver;
+import 
org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ConditionContext;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Lazy;
+import org.springframework.core.type.AnnotatedTypeMetadata;
+
+/**
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Configuration
+@ConditionalOnBean(type = 
"org.apache.camel.spring.boot.CamelAutoConfiguration")
+@Conditional(MiloClientComponentAutoConfiguration.Condition.class)
+@AutoConfigureAfter(name = 
"org.apache.camel.spring.boot.CamelAutoConfiguration")
+@EnableConfigurationProperties(MiloClientComponentConfiguration.class)
+public class MiloClientComponentAutoConfiguration {
+
+@Lazy
+@Bean(name = "milo-client-component")
+@ConditionalOnClass(CamelContext.class)
+@ConditionalOnMissingBean(MiloClientComponent.class)
+public MiloClientComponent configureMiloClientComponent(
+CamelContext camelContext,
+MiloClientComponentConfiguration configuration) throws Exception {
+MiloClientComponent component = new 

[05/18] camel git commit: Initial import of Camel Milo

2017-04-12 Thread acosentino
Initial import of Camel Milo

Signed-off-by: Jens Reimann 


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

Branch: refs/heads/master
Commit: 7b3837fae7acf115885da3ea3958b79042240d26
Parents: 586f940
Author: Jens Reimann 
Authored: Mon Apr 10 15:48:30 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:26 2017 +0200

--
 components/camel-milo/pom.xml   | 104 
 .../camel-milo/src/main/docs/milo-client.adoc   | 168 ++
 .../camel-milo/src/main/docs/milo-server.adoc   | 111 
 .../camel/component/milo/KeyStoreLoader.java| 145 +
 .../apache/camel/component/milo/Messages.java   |  38 ++
 .../camel/component/milo/NamespaceId.java   |  83 +++
 .../camel/component/milo/PartialNodeId.java | 119 
 .../milo/client/MiloClientComponent.java| 219 +++
 .../milo/client/MiloClientConfiguration.java| 292 ++
 .../milo/client/MiloClientConnection.java   | 127 +
 .../milo/client/MiloClientConsumer.java |  92 +++
 .../milo/client/MiloClientEndpoint.java | 242 
 .../client/MiloClientItemConfiguration.java |  28 +
 .../milo/client/MiloClientProducer.java |  63 ++
 .../client/internal/SubscriptionManager.java| 570 +++
 .../component/milo/client/package-info.java |  20 +
 .../milo/converter/ValueConverter.java  |  38 ++
 .../component/milo/converter/package-info.java  |   4 +
 .../camel/component/milo/package-info.java  |  20 +
 .../milo/server/MiloServerComponent.java| 466 +++
 .../milo/server/MiloServerConsumer.java |  78 +++
 .../milo/server/MiloServerEndpoint.java | 106 
 .../milo/server/MiloServerProducer.java |  38 ++
 .../milo/server/internal/CamelNamespace.java| 213 +++
 .../milo/server/internal/CamelServerItem.java   | 146 +
 .../component/milo/server/package-info.java |  20 +
 .../src/main/resources/META-INF/LICENSE.txt | 203 +++
 .../src/main/resources/META-INF/NOTICE.txt  |  11 +
 .../services/org/apache/camel/TypeConverter |   1 +
 .../org/apache/camel/component/milo-client  |   1 +
 .../org/apache/camel/component/milo-server  |   1 +
 .../component/milo/AbstractMiloServerTest.java  |  90 +++
 .../MonitorItemMultiConnectionsCertTest.java| 124 
 .../milo/MonitorItemMultiConnectionsTest.java   |  99 
 .../camel/component/milo/MonitorItemTest.java   |  89 +++
 .../apache/camel/component/milo/NodeIdTest.java | 100 
 .../camel/component/milo/WriteClientTest.java   | 156 +
 .../component/milo/converter/ConverterTest.java |  49 ++
 .../component/milo/server/ServerLocalTest.java  |  83 +++
 .../server/ServerSetCertificateManagerTest.java |  51 ++
 .../server/ServerSetSecurityPoliciesTest.java   |  50 ++
 .../component/milo/testing/Application.java |  72 +++
 .../milo/testing/Application2Client.java|  59 ++
 .../milo/testing/Application2Server.java|  72 +++
 .../camel-milo/src/test/resources/cert/Makefile |  16 +
 .../camel-milo/src/test/resources/cert/cert.ini |  13 +
 .../camel-milo/src/test/resources/cert/cert.p12 | Bin 0 -> 2461 bytes
 .../src/test/resources/cert/certificate.crt |  20 +
 .../src/test/resources/cert/certificate.der | Bin 0 -> 856 bytes
 .../src/test/resources/cert/privateKey.key  |  28 +
 .../src/test/resources/log4j2.properties|  28 +
 components/pom.xml  |   1 +
 parent/pom.xml  |   1 +
 .../camel-milo-starter/pom.xml  |  51 ++
 .../src/main/resources/META-INF/LICENSE.txt | 203 +++
 .../src/main/resources/META-INF/NOTICE.txt  |  11 +
 .../src/main/resources/META-INF/spring.provides |  18 +
 .../spring-boot/components-starter/pom.xml  |   1 +
 58 files changed, 5252 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/7b3837fa/components/camel-milo/pom.xml
--
diff --git a/components/camel-milo/pom.xml b/components/camel-milo/pom.xml
new file mode 100644
index 000..5c597ba
--- /dev/null
+++ b/components/camel-milo/pom.xml
@@ -0,0 +1,104 @@
+
+
+http://maven.apache.org/POM/4.0.0; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd;>
+4.0.0
+
+
+org.apache.camel
+components
+2.19.0-SNAPSHOT
+
+
+camel-milo
+jar
+Camel :: Milo
+Camel OPC UA support
+
+
+
+ 

[10/18] camel git commit: Rename documentation files

2017-04-12 Thread acosentino
Rename documentation files


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

Branch: refs/heads/master
Commit: 10c10a70a5acec8c9f00021b27e23deba1820735
Parents: 89333ca
Author: Jens Reimann 
Authored: Wed Apr 12 09:28:42 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:27 2017 +0200

--
 .../src/main/docs/milo-client-component.adoc| 168 +++
 .../camel-milo/src/main/docs/milo-client.adoc   | 168 ---
 .../src/main/docs/milo-server-component.adoc| 111 
 .../camel-milo/src/main/docs/milo-server.adoc   | 111 
 4 files changed, 279 insertions(+), 279 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/10c10a70/components/camel-milo/src/main/docs/milo-client-component.adoc
--
diff --git a/components/camel-milo/src/main/docs/milo-client-component.adoc 
b/components/camel-milo/src/main/docs/milo-client-component.adoc
new file mode 100644
index 000..f1585cf
--- /dev/null
+++ b/components/camel-milo/src/main/docs/milo-client-component.adoc
@@ -0,0 +1,168 @@
+[[MiloClient-MiloClientComponent]]
+
+Milo Client Component
+~~~
+
+*Available as of Camel 2.19*
+
+The *Milo Client* component provides access to OPC UA servers using the
+http://eclipse.org/milo[Eclipse Milo™] implementation.
+
+*Java 8*: This component requires Java 8 at runtime. 
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+
+
+de.dentrassi.camel
+de.dentrassi.camel.milo
+
+
+
+
+
+
+// component options: START
+The Milo based OPC UA Client component supports 5 options which are listed 
below.
+
+
+
+[width="100%",cols="2s,1m,8",options="header"]
+|===
+| Name | Java Type | Description
+| defaultConfiguration | MiloClientConfiguration | All default options for 
client
+| applicationName | String | Default application name
+| applicationUri | String | Default application URI
+| productUri | String | Default product URI
+| reconnectTimeout | Long | Default reconnect timeout
+|===
+// component options: END
+
+
+
+[[MiloClient-URIformat]]
+URI format
+^^
+
+The URI syntax of the endpoint is: 
+
+[source]
+
+milo-client:tcp://[user:password@]host:port/path/to/service?node=RAW(nsu=urn:foo:bar;s=item-1)
+
+
+If the server does not use a path, then it is possible to simply omit it:
+
+
+milo-client:tcp://[user:password@]host:port?node=RAW(nsu=urn:foo:bar;s=item-1)
+
+
+If no user credentials are provided the client will switch to anonymous mode.
+
+[[MiloClient-URIOptions]]
+URI options
+^^^
+
+All configuration options in the group +client+ are applicable to the shared 
client instance. Endpoints
+will share client instances for each endpoint URI. So the first time a request 
for that endpoint URI is
+made, the options of the +client+ group are applied. All further instances 
will be ignored.
+
+If you need alternate options for the same endpoint URI it is possible though 
to set the +clientId+ option
+which will by added internally to the endpoint URI in order to select a 
different shared connection instance.
+In other words, shared connections located by the combination of endpoint URI 
and client id.
+
+
+
+
+
+
+
+
+
+
+
+
+// endpoint options: START
+The Milo based OPC UA Client component supports 27 endpoint options which are 
listed below:
+
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|===
+| Name | Group | Default | Java Type | Description
+| endpointUri | common |  | String | *Required* The OPC UA server endpoint
+| clientId | common |  | String | A virtual client id to force the creation of 
a new connection instance
+| defaultAwaitWrites | common | false | boolean | Default await setting for 
writes
+| namespaceIndex | common |  | Integer | The namespace as numeric index 
deprecated
+| namespaceUri | common |  | String | The namespace as URI deprecated
+| node | common |  | ExpandedNodeId | The node definition (see Node ID)
+| nodeId | common |  | String | The node ID as string ID deprecated
+| samplingInterval | common |  | Double | The sampling interval in 

[09/18] camel git commit: Mark secrets as secret

2017-04-12 Thread acosentino
Mark secrets as secret


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

Branch: refs/heads/master
Commit: 8021165843617ac27357aed55e4d4d8609304e5b
Parents: 47a9019
Author: Jens Reimann 
Authored: Tue Apr 11 19:33:28 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:26 2017 +0200

--
 .../camel/component/milo/client/MiloClientConfiguration.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/80211658/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConfiguration.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConfiguration.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConfiguration.java
index e1e7301..037a109 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConfiguration.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientConfiguration.java
@@ -76,10 +76,10 @@ public class MiloClientConfiguration implements Cloneable {
@UriParam(label = "client")
private String keyAlias;
 
-   @UriParam(label = "client")
+   @UriParam(label = "client", secret = true)
private String keyStorePassword;
 
-   @UriParam(label = "client")
+   @UriParam(label = "client", secret = true)
private String keyPassword;
 
public MiloClientConfiguration() {



[18/18] camel git commit: Regen docs

2017-04-12 Thread acosentino
Regen docs


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

Branch: refs/heads/master
Commit: b7df957753ff5aa616a3774d0f0766346015b136
Parents: 839453f
Author: Andrea Cosentino 
Authored: Wed Apr 12 10:54:18 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:27 2017 +0200

--
 .../camel-milo/src/main/docs/milo-client-component.adoc  | 2 +-
 components/readme.adoc   | 8 +++-
 docs/user-manual/en/SUMMARY.md   | 2 ++
 3 files changed, 10 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/b7df9577/components/camel-milo/src/main/docs/milo-client-component.adoc
--
diff --git a/components/camel-milo/src/main/docs/milo-client-component.adoc 
b/components/camel-milo/src/main/docs/milo-client-component.adoc
index 4b8d342..a68163c 100644
--- a/components/camel-milo/src/main/docs/milo-client-component.adoc
+++ b/components/camel-milo/src/main/docs/milo-client-component.adoc
@@ -85,7 +85,7 @@ In other words, shared connections located by the combination 
of endpoint URI an
 // endpoint options: START
 The Milo based OPC UA Client endpoint is configured using URI syntax:
 
-
milo-client:tcp://user:password@host:port/path/to/service?itemId=item.id=urn:foo:bar
+milo-client:tcp://user:password@host:port/path/to/service
 
 with the following path and query parameters:
 

http://git-wip-us.apache.org/repos/asf/camel/blob/b7df9577/components/readme.adoc
--
diff --git a/components/readme.adoc b/components/readme.adoc
index 9991e20..0dfca91 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -2,7 +2,7 @@ Components
 ^^
 
 // components: START
-Number of Components: 228 in 182 JAR artifacts (14 deprecated)
+Number of Components: 230 in 183 JAR artifacts (14 deprecated)
 
 [width="100%",cols="4,1,5",options="header"]
 |===
@@ -389,6 +389,9 @@ Number of Components: 228 in 182 JAR artifacts (14 
deprecated)
 | link:camel-metrics/src/main/docs/metrics-component.adoc[Metrics] 
(camel-metrics) +
 `metrics:metricsType:metricsName` | 2.14 | To collect various metrics directly 
from Camel routes using the DropWizard metrics library.
 
+| link:camel-milo/src/main/docs/milo-client-component.adoc[Milo based OPC UA 
Client] (camel-milo) +
+`milo-client:tcp://user:password@host:port/path/to/service` |  | Camel OPC UA 
support
+
 | link:camel-mina/src/main/docs/mina-component.adoc[Mina] (camel-mina) +
 `mina:protocol:host:port` | 1.0 | *deprecated* Socket level networking using 
TCP or UDP with the Apache Mina 1.x library.
 
@@ -449,6 +452,9 @@ Number of Components: 228 in 182 JAR artifacts (14 
deprecated)
 | link:camel-olingo4/src/main/docs/olingo4-component.adoc[Olingo4] 
(camel-olingo4) +
 `olingo4:apiName/methodName` | 2.19 | Communicates with OData 4.0 services 
using Apache Olingo OData API.
 
+| link:camel-milo/src/main/docs/milo-server-component.adoc[OPC UA Server] 
(camel-milo) +
+`milo-server:itemId` |  | OPC UA Server based endpoint
+
 | link:camel-openshift/src/main/docs/openshift-component.adoc[OpenShift] 
(camel-openshift) +
 `openshift:clientId` | 2.14 | *deprecated* To manage your Openshift 2.x 
applications.
 

http://git-wip-us.apache.org/repos/asf/camel/blob/b7df9577/docs/user-manual/en/SUMMARY.md
--
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index e5330bf..bdd6a79 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -239,6 +239,7 @@
* [Lucene](lucene-component.adoc)
* [Lumberjack](lumberjack-component.adoc)
* [Metrics](metrics-component.adoc)
+   * [Milo based OPC UA Client](milo-client-component.adoc)
* [Mina](mina-component.adoc)
* [Mina2](mina2-component.adoc)
* [MLLP](mllp-component.adoc)
@@ -258,6 +259,7 @@
* [Netty4 HTTP](netty4-http-component.adoc)
* [Olingo2](olingo2-component.adoc)
* [Olingo4](olingo4-component.adoc)
+   * [OPC UA Server](milo-server-component.adoc)
* [OpenShift](openshift-component.adoc)
* [OpenStack Cinder](openstack-cinder-component.adoc)
* [OpenStack Glance](openstack-glance-component.adoc)



[11/18] camel git commit: Organize imports

2017-04-12 Thread acosentino
Organize imports


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

Branch: refs/heads/master
Commit: 942f160c23298adc1bafe671e8d591ed0896fece
Parents: 19db14d
Author: Jens Reimann 
Authored: Wed Apr 12 09:51:50 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 10:55:27 2017 +0200

--
 .../org/apache/camel/component/milo/NamespaceId.java |  4 ++--
 .../org/apache/camel/component/milo/PartialNodeId.java   | 11 ++-
 .../camel/component/milo/client/MiloClientComponent.java |  8 
 .../component/milo/client/MiloClientConnection.java  |  4 ++--
 .../camel/component/milo/server/MiloServerComponent.java |  7 ---
 .../component/milo/server/internal/CamelNamespace.java   |  4 ++--
 .../component/milo/server/internal/CamelServerItem.java  |  4 ++--
 .../milo/MonitorItemMultiConnectionsCertTest.java|  4 ++--
 .../java/org/apache/camel/component/milo/NodeIdTest.java | 10 +-
 .../org/apache/camel/component/milo/WriteClientTest.java |  4 ++--
 .../milo/server/ServerSetCertificateManagerTest.java |  4 ++--
 11 files changed, 33 insertions(+), 31 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/942f160c/components/camel-milo/src/main/java/org/apache/camel/component/milo/NamespaceId.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/NamespaceId.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/NamespaceId.java
index ac5bf9f..8e19ec0 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/NamespaceId.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/NamespaceId.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.milo;
 
-import static java.util.Objects.requireNonNull;
-
 import java.io.Serializable;
 
+import static java.util.Objects.requireNonNull;
+
 import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
 import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/942f160c/components/camel-milo/src/main/java/org/apache/camel/component/milo/PartialNodeId.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/PartialNodeId.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/PartialNodeId.java
index 172702a..a9e2006 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/PartialNodeId.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/PartialNodeId.java
@@ -16,13 +16,13 @@
  */
 package org.apache.camel.component.milo;
 
-import static java.util.Objects.requireNonNull;
-import static 
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.uint;
-import static 
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.ushort;
-
 import java.io.Serializable;
 import java.util.UUID;
 
+import static java.util.Objects.requireNonNull;
+
+import com.google.common.base.MoreObjects;
+
 import org.eclipse.milo.opcua.stack.core.types.builtin.ByteString;
 import org.eclipse.milo.opcua.stack.core.types.builtin.ExpandedNodeId;
 import org.eclipse.milo.opcua.stack.core.types.builtin.NodeId;
@@ -30,7 +30,8 @@ import 
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UInteger;
 import org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.UShort;
 import org.eclipse.milo.opcua.stack.core.types.enumerated.IdType;
 
-import com.google.common.base.MoreObjects;
+import static 
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.uint;
+import static 
org.eclipse.milo.opcua.stack.core.types.builtin.unsigned.Unsigned.ushort;
 
 public class PartialNodeId {
 

http://git-wip-us.apache.org/repos/asf/camel/blob/942f160c/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientComponent.java
--
diff --git 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientComponent.java
 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientComponent.java
index 580d5e9..ed75037 100644
--- 
a/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientComponent.java
+++ 
b/components/camel-milo/src/main/java/org/apache/camel/component/milo/client/MiloClientComponent.java
@@ -22,6 +22,10 @@ import java.util.HashMap;
 import 

camel git commit: Fix camel-infinispan documentation

2017-04-12 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master a41bef538 -> 586f9409d


Fix camel-infinispan documentation


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

Branch: refs/heads/master
Commit: 586f9409dc576ca7f61bf8db58c3a350e642d2f2
Parents: a41bef5
Author: lburgazzoli 
Authored: Wed Apr 12 10:43:18 2017 +0200
Committer: lburgazzoli 
Committed: Wed Apr 12 10:43:25 2017 +0200

--
 .../camel-infinispan/src/main/docs/infinispan-component.adoc   | 6 +++---
 .../camel/component/infinispan/InfinispanConfiguration.java| 3 +--
 components/readme.adoc | 2 +-
 3 files changed, 5 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/586f9409/components/camel-infinispan/src/main/docs/infinispan-component.adoc
--
diff --git 
a/components/camel-infinispan/src/main/docs/infinispan-component.adoc 
b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
index c7821bf..f29e852 100644
--- a/components/camel-infinispan/src/main/docs/infinispan-component.adoc
+++ b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
@@ -61,20 +61,20 @@ The Infinispan endpoint is configured using URI syntax:
 
 with the following path and query parameters:
 
- Path Parameters (2 parameters):
+ Path Parameters (1 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
 | **cacheName** | *Required* The cache to use |  | String
-| **hosts** | Specifies the host of the cache on Infinispan instance |  | 
String
 |===
 
- Query Parameters (15 parameters):
+ Query Parameters (16 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
+| **hosts** (common) | Specifies the host of the cache on Infinispan instance 
|  | String
 | **queryBuilder** (common) | Specifies the query builder. |  | 
InfinispanQueryBuilder
 | **bridgeErrorHandler** (consumer) | Allows for bridging the consumer to the 
Camel routing Error Handler which mean any exceptions occurred while the 
consumer is trying to pickup incoming messages or the likes will now be 
processed as a message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | **clusteredListener** (consumer) | If true the listener will be installed 
for the entire cluster | false | boolean

http://git-wip-us.apache.org/repos/asf/camel/blob/586f9409/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
--
diff --git 
a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
 
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
index 837c805..f84eaa4 100644
--- 
a/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
+++ 
b/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/InfinispanConfiguration.java
@@ -25,14 +25,13 @@ import java.util.Set;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
-import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ObjectHelper;
 import org.infinispan.commons.api.BasicCacheContainer;
 import org.infinispan.context.Flag;
 
 @UriParams
 public class InfinispanConfiguration implements Cloneable {
-@UriPath
+@UriParam
 private String hosts;
 @UriParam(label = "producer", defaultValue = "put", enums =
  "put,putAll,putIfAbsent,putAsync,putAllAsync,putIfAbsentAsync,"

http://git-wip-us.apache.org/repos/asf/camel/blob/586f9409/components/readme.adoc
--
diff --git a/components/readme.adoc b/components/readme.adoc
index e54b2ba..9991e20 100644
--- a/components/readme.adoc
+++ b/components/readme.adoc
@@ -297,7 +297,7 @@ Number of Components: 228 in 182 JAR artifacts (14 
deprecated)
 `imap:host:port` | 1.0 | To send or receive emails using imap/pop3 or 

[1/3] camel git commit: update Spring LDAP component documentation to indicate that base DN is not needed if specified in ContextSource

2017-04-12 Thread davsclaus
Repository: camel
Updated Branches:
  refs/heads/master 49f2bb517 -> a41bef538


update Spring LDAP component documentation to indicate that base DN is not 
needed if specified in ContextSource


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

Branch: refs/heads/master
Commit: 764722269b7366956a8e379160d3ea27f07108d1
Parents: 152916a
Author: Ken Geis 
Authored: Tue Apr 4 12:16:43 2017 -0700
Committer: Claus Ibsen 
Committed: Wed Apr 12 10:26:18 2017 +0200

--
 .../camel-spring-ldap/src/main/docs/spring-ldap-component.adoc| 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/76472226/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc
--
diff --git 
a/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc 
b/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc
index 07886ba..dd73c70 100644
--- a/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc
+++ b/components/camel-spring-ldap/src/main/docs/spring-ldap-component.adoc
@@ -71,7 +71,8 @@ with the following path and query parameters:
 The component supports producer endpoint only. An attempt to create a
 consumer endpoint will result in an `UnsupportedOperationException`. +
  The body of the message must be a map (an instance of `java.util.Map`).
-This map must contain at least an entry with the key *`dn`* (not needed for 
function_driven operation) that
+Unless a base DN is specified by in the configuration of your ContextSource,
+this map must contain at least an entry with the key *`dn`* (not needed for 
function_driven operation) that
 specifies the root node for the LDAP operation to be performed. Other
 entries of the map are operation-specific (see below).
 



[3/3] camel git commit: Fixed CS. This closes #1592

2017-04-12 Thread davsclaus
Fixed CS. This closes #1592


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

Branch: refs/heads/master
Commit: a41bef53829213008b8a95b9b70d598738defe68
Parents: 7647222
Author: Claus Ibsen 
Authored: Wed Apr 12 10:29:12 2017 +0200
Committer: Claus Ibsen 
Committed: Wed Apr 12 10:29:12 2017 +0200

--
 .../apache/camel/component/springldap/SpringLdapProducer.java   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/a41bef53/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
--
diff --git 
a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
 
b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
index 84259c4..328dbd2 100644
--- 
a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
+++ 
b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
@@ -18,7 +18,6 @@ package org.apache.camel.component.springldap;
 
 import java.util.Map;
 import java.util.function.BiFunction;
-
 import javax.naming.NamingException;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.ModificationItem;
@@ -97,8 +96,8 @@ public class SpringLdapProducer extends DefaultProducer {
 if (StringUtils.isBlank(dn)) {
 ContextSource contextSource = ldapTemplate.getContextSource();
 if (contextSource instanceof BaseLdapPathContextSource) {
-   dn = ((BaseLdapPathContextSource) 
contextSource).getBaseLdapPathAsString();
-   }
+dn = ((BaseLdapPathContextSource) 
contextSource).getBaseLdapPathAsString();
+}
 }
 if (operation != LdapOperation.FUNCTION_DRIVEN && 
(StringUtils.isBlank(dn))) {
 throw new UnsupportedOperationException("DN must not be empty, but 
you provided an empty DN");



[2/3] camel git commit: CAMEL-11060: fall back on base DN specified on Spring LDAP context source if none is defined in the URI

2017-04-12 Thread davsclaus
CAMEL-11060: fall back on base DN specified on Spring LDAP context source if 
none is defined in the URI


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

Branch: refs/heads/master
Commit: 152916a772769414dbb8c1dce02304d7e2a88174
Parents: 49f2bb5
Author: Ken Geis 
Authored: Tue Apr 4 11:34:22 2017 -0700
Committer: Claus Ibsen 
Committed: Wed Apr 12 10:26:18 2017 +0200

--
 .../camel/component/springldap/SpringLdapProducer.java   | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/152916a7/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
--
diff --git 
a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
 
b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
index 23e2779..84259c4 100644
--- 
a/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
+++ 
b/components/camel-spring-ldap/src/main/java/org/apache/camel/component/springldap/SpringLdapProducer.java
@@ -27,8 +27,10 @@ import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.ldap.core.AttributesMapper;
+import org.springframework.ldap.core.ContextSource;
 import org.springframework.ldap.core.LdapOperations;
 import org.springframework.ldap.core.LdapTemplate;
+import org.springframework.ldap.core.support.BaseLdapPathContextSource;
 import org.springframework.ldap.query.LdapQueryBuilder;
 
 public class SpringLdapProducer extends DefaultProducer {
@@ -89,12 +91,19 @@ public class SpringLdapProducer extends DefaultProducer {
 throw new UnsupportedOperationException("LDAP operation must not 
be empty, but you provided an empty operation");
 }
 
+LdapTemplate ldapTemplate = endpoint.getLdapTemplate();
+
 String dn = (String)body.get(DN);
+if (StringUtils.isBlank(dn)) {
+ContextSource contextSource = ldapTemplate.getContextSource();
+if (contextSource instanceof BaseLdapPathContextSource) {
+   dn = ((BaseLdapPathContextSource) 
contextSource).getBaseLdapPathAsString();
+   }
+}
 if (operation != LdapOperation.FUNCTION_DRIVEN && 
(StringUtils.isBlank(dn))) {
 throw new UnsupportedOperationException("DN must not be empty, but 
you provided an empty DN");
 }
 
-LdapOperations ldapTemplate = endpoint.getLdapTemplate();
 switch (operation) {
 case SEARCH:
 String filter = (String)body.get(FILTER);



svn commit: r1010308 - in /websites/production/camel/content: book-architecture.html book-in-one-page.html cache/main.pageCache camel-219-release.html component-list.html component.html components.htm

2017-04-12 Thread buildbot
Author: buildbot
Date: Wed Apr 12 08:21:23 2017
New Revision: 1010308

Log:
Production update by buildbot for camel

Modified:
websites/production/camel/content/book-architecture.html
websites/production/camel/content/book-in-one-page.html
websites/production/camel/content/cache/main.pageCache
websites/production/camel/content/camel-219-release.html
websites/production/camel/content/component-list.html
websites/production/camel/content/component.html
websites/production/camel/content/components.html
websites/production/camel/content/infinispan.html
websites/production/camel/content/transport.html
websites/production/camel/content/uris.html

Modified: websites/production/camel/content/book-architecture.html
==
--- websites/production/camel/content/book-architecture.html (original)
+++ websites/production/camel/content/book-architecture.html Wed Apr 12 
08:21:23 2017
@@ -341,7 +341,7 @@ flink:datastream[?options]]]>
 
 For 
working with the HL7 MLLP protocol and the HL7 data format using the http://hl7api.sourceforge.net; 
rel="nofollow">HAPI libraryInfinispan 
/camel-infinispan
-
 For 
reading/writing from/to http://infinispan.org/; rel="nofollow">Infinispan distributed 
key/value store and data gridHTTP 
/camel-http
 
 
 For 
working with the HL7 MLLP protocol and the HL7 data format using the http://hl7api.sourceforge.net; 
rel="nofollow">HAPI libraryInfinispan 
/camel-infinispan
-
 For 
reading/writing from/to http://infinispan.org/; rel="nofollow">Infinispan distributed 
key/value store and data gridHTTP 
/camel-http
 Examples useful.
 
 

Tutorial on Spring Remoting with JMS

 

Thanks

This tutorial was kindly donated to Apache Camel by Martin Gilday.

Preface

This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a http://www.springramework.org"; rel="nofollow">Spring service. The route works in a synchronous fashion returning a response to the client.


camel git commit: CAMEL-11108: camel-infinispan : change the uri syntax from infinispan:hostName to infinispan:cacheName

2017-04-12 Thread lburgazzoli
Repository: camel
Updated Branches:
  refs/heads/master 07b53e108 -> 49f2bb517


CAMEL-11108: camel-infinispan : change the uri syntax from infinispan:hostName 
to infinispan:cacheName


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

Branch: refs/heads/master
Commit: 49f2bb51710a17e1506262d9d58ca1543a747156
Parents: 07b53e1
Author: lburgazzoli 
Authored: Thu Apr 6 15:11:54 2017 +0200
Committer: lburgazzoli 
Committed: Wed Apr 12 09:43:19 2017 +0200

--
 .../src/main/docs/infinispan-component.adoc |  27 ++-
 .../infinispan/InfinispanComponent.java |  55 +-
 .../infinispan/InfinispanConfiguration.java |  58 ---
 .../infinispan/InfinispanConsumer.java  |   6 +-
 .../infinispan/InfinispanEndpoint.java  |  28 ++-
 .../component/infinispan/InfinispanManager.java | 106 
 .../infinispan/InfinispanProducer.java  |   6 +-
 .../component/infinispan/InfinispanUtil.java|  27 ++-
 .../InfinispanIdempotentRepository.java |   3 +-
 .../infinispan/InfinispanAsyncConsumerTest.java |  19 +--
 .../InfinispanClusteredConsumerTest.java|   4 +-
 .../infinispan/InfinispanComponentTest.java |  29 ++--
 .../InfinispanConfigurationTestIT.java  |  15 +-
 .../InfinispanConsumerEntryCreatedTest.java |   2 +-
 .../InfinispanConsumerEntryRemovedTest.java |   2 +-
 .../InfinispanConsumerEntryUpdatedTest.java |   2 +-
 .../InfinispanConsumerEntryVisitedTest.java |   2 +-
 .../infinispan/InfinispanContinuousQueryIT.java |   6 +-
 ...InfinispanLocalConsumerCustomListenerIT.java |   5 +-
 .../infinispan/InfinispanLocalConsumerTest.java |   4 +-
 .../infinispan/InfinispanProducerTest.java  |  34 ++--
 .../InfinispanRemoteProducerTest.java   |   2 +-
 .../InfinispanRemoteQueryProducerIT.java|  28 ++-
 .../infinispan/InfinispanSyncConsumerTest.java  |   2 +-
 .../InfinispanComponentAutoConfiguration.java   |  33 +++-
 .../InfinispanComponentConfiguration.java   | 169 +++
 26 files changed, 483 insertions(+), 191 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/49f2bb51/components/camel-infinispan/src/main/docs/infinispan-component.adoc
--
diff --git 
a/components/camel-infinispan/src/main/docs/infinispan-component.adoc 
b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
index 85f2615..c7821bf 100644
--- a/components/camel-infinispan/src/main/docs/infinispan-component.adoc
+++ b/components/camel-infinispan/src/main/docs/infinispan-component.adoc
@@ -26,7 +26,7 @@ for this component:
 
 [source,java]
 ---
-infinispan://hostName?[options]
+infinispan://cacheName?[options]
 ---
 
 ### URI Options
@@ -38,7 +38,17 @@ accessible from the registry.
 
 
 // component options: START
-The Infinispan component has no options.
+The Infinispan component supports 3 options which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| **configuration** (common) | The default configuration shared among 
endpoints. |  | InfinispanConfiguration
+| **cacheContainer** (common) | The default cache container. |  | 
BasicCacheContainer
+| **resolveProperty Placeholders** (advanced) | Whether the component should 
resolve property placeholders on itself when starting. Only properties which 
are of String type can use property placeholders. | true | boolean
+|===
 // component options: END
 
 
@@ -47,16 +57,17 @@ The Infinispan component has no options.
 // endpoint options: START
 The Infinispan endpoint is configured using URI syntax:
 
-infinispan:host
+infinispan:cacheName
 
 with the following path and query parameters:
 
- Path Parameters (1 parameters):
+ Path Parameters (2 parameters):
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| **host** | *Required* Specifies the host of the cache on Infinispan instance 
|  | String
+| **cacheName** | *Required* The cache to use |  | String
+| **hosts** | Specifies the host of the cache on Infinispan instance |  | 
String
 |===
 
  Query Parameters (15 parameters):
@@ -64,8 +75,6 @@ with the following path and query parameters:
 

camel git commit: Upgrade Hazelcast to version 3.8.1

2017-04-12 Thread acosentino
Repository: camel
Updated Branches:
  refs/heads/master 70e08b750 -> 07b53e108


Upgrade Hazelcast to version 3.8.1


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

Branch: refs/heads/master
Commit: 07b53e10890840ce4ac3d25e3b7834796d22b440
Parents: 70e08b7
Author: Andrea Cosentino 
Authored: Wed Apr 12 09:02:08 2017 +0200
Committer: Andrea Cosentino 
Committed: Wed Apr 12 09:02:08 2017 +0200

--
 parent/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/camel/blob/07b53e10/parent/pom.xml
--
diff --git a/parent/pom.xml b/parent/pom.xml
index 6812d24..43b8252 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -258,7 +258,7 @@
 1.11
 1.6
 1.22
-3.8
+3.8.1
 1.2.1
 4.0.38
 5.4.1.Final