You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/04/12 19:56:25 UTC

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

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 <pr...@gmail.com>
Authored: Wed Apr 12 10:39:35 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
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 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- 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. -->
+<!--
+  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.
+-->
 <project xmlns="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">
   <modelVersion>4.0.0</modelVersion>

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 to a subscriber uuid. State information is supplied as a JSON object of key/value pairs SETSTATE: Used to set key/value pairs specific to a subscriber uuid GETHISTORY: Fetches historical messages of a channel. |  | String
+| **pubnub** (advanced) | Reference to a Pubnub client in the registry. |  | PubNub
 | **synchronous** (advanced) | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported). | false | boolean
 | **authKey** (security) | If Access Manager is utilized client will use this authKey in all restricted requests. |  | String
 | **cipherKey** (security) | If cipher is passed all communicatons to/from PubNub will be encrypted. |  | String
 | **publishKey** (security) | The publish key obtained from your PubNub account. Required when publishing messages. |  | String
 | **secretKey** (security) | The secret key used for message signing. |  | String
+| **secure** (security) | Use SSL for secure transmission. | true | boolean
 | **subscribeKey** (security) | The subscribe key obtained from your PubNub account. Required when subscribing to channels or listening for presence events |  | String
 |=======================================================================
 // endpoint options: END
@@ -111,7 +111,7 @@ The following snippet publish the event DeviceInfo to the channel iot.
 from("timer:mytimer")
     // generate some data as POJO.
     .bean(PojoBean.class)
-    .to("pubnub://iot?publishKey=mypublishKey");
+    .to("pubnub:iot?publishKey=mypublishKey");
 ----
 
 #### Subscribing to events
@@ -121,7 +121,7 @@ If you can add the option withPresens, you will also receive channel Join, Leave
 
 [source,java]
 ----
-from("pubnub://iot?subscribeKey=mySubscribeKey")
+from("pubnub:iot?subscribeKey=mySubscribeKey")
     .log("${body}")
     .to("mock:result");
 ----
@@ -140,4 +140,4 @@ The example illustrates the PubNub component subscribing to a infinite stream of
 * link:endpoint.html[Endpoint]
 * link:getting-started.html[Getting Started]
 
-* link:rss.html[RSS]
\ No newline at end of file
+* link:rss.html[RSS]

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
index b9a0ad6..d8546b7 100644
--- a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
+++ b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConfiguration.java
@@ -44,7 +44,7 @@ public class PubNubConfiguration {
     @UriParam(label = "security", secret = true)
     private String cipherKey;
 
-    @UriParam(defaultValue = "true")
+    @UriParam(label = "security", defaultValue = "true")
     private boolean secure = true;
 
     @UriParam()
@@ -112,7 +112,7 @@ public class PubNubConfiguration {
     }
 
     /**
-     * Use ssl
+     * Use SSL for secure transmission.
      */
     public boolean isSecure() {
         return this.secure;

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
index 2ae6529..3fecaca 100644
--- a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
+++ b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubConsumer.java
@@ -105,7 +105,7 @@ public class PubNubConsumer extends DefaultConsumer {
 
         @Override
         public void message(PubNub pubnub, PNMessageResult message) {
-            Exchange exchange = new DefaultExchange(endpoint, endpoint.getExchangePattern());
+            Exchange exchange = endpoint.createExchange();
             Message inmessage = exchange.getIn();
             inmessage.setBody(message);
             inmessage.setHeader(TIMETOKEN, message.getTimetoken());

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
index a592e7a..f7d2c3f 100644
--- a/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
+++ b/components/camel-pubnub/src/main/java/org/apache/camel/component/pubnub/PubNubEndpoint.java
@@ -28,10 +28,10 @@ import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.ObjectHelper;
 
-@UriEndpoint(scheme = "pubnub", title = "PubNub", syntax = "pubnub://channel", consumerClass = PubNubConsumer.class, label = "cloud,iot,messaging")
+@UriEndpoint(scheme = "pubnub", title = "PubNub", syntax = "pubnub:channel", consumerClass = PubNubConsumer.class, label = "cloud,iot,messaging")
 public class PubNubEndpoint extends DefaultEndpoint {
 
-    @UriParam
+    @UriParam(label = "advanced")
     private PubNub pubnub;
 
     @UriParam
@@ -42,8 +42,6 @@ public class PubNubEndpoint extends DefaultEndpoint {
         this.configuration = configuration;
     }
 
-    
-
     @Override
     public Producer createProducer() throws Exception {
         return new PubNubProducer(this, configuration);
@@ -66,7 +64,6 @@ public class PubNubEndpoint extends DefaultEndpoint {
     /**
      * Reference to a Pubnub client in the registry.
      */
-
     public PubNub getPubnub() {
         return pubnub;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
index 12aca16..53193ce 100644
--- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
+++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubConfigurationTest.java
@@ -30,7 +30,7 @@ public class PubNubConfigurationTest extends CamelTestSupport {
     @Test
     public void createEndpointWithMinimalConfiguration() throws Exception {
         PubNubComponent component = new PubNubComponent(context);
-        PubNubEndpoint endpoint = (PubNubEndpoint) component.createEndpoint("pubnub://xxx?subscribeKey=mysubkey");
+        PubNubEndpoint endpoint = (PubNubEndpoint) component.createEndpoint("pubnub:xxx?subscribeKey=mysubkey");
 
         assertEquals("xxx", endpoint.getConfiguration().getChannel());
         assertEquals("mysubkey", endpoint.getConfiguration().getSubscribeKey());
@@ -41,7 +41,7 @@ public class PubNubConfigurationTest extends CamelTestSupport {
     public void createEndpointWithMaximalConfiguration() throws Exception {
         PubNubComponent component = new PubNubComponent(context);
         PubNubEndpoint endpoint = (PubNubEndpoint)component
-            .createEndpoint("pubnub://xxx?subscribeKey=mysubkey&publishKey=mypubkey&secretKey=secrets&uuid=myuuid&operation=PUBLISH&secure=false&authKey=authKey");
+            .createEndpoint("pubnub:xxx?subscribeKey=mysubkey&publishKey=mypubkey&secretKey=secrets&uuid=myuuid&operation=PUBLISH&secure=false&authKey=authKey");
 
         assertEquals("xxx", endpoint.getConfiguration().getChannel());
         assertEquals("mysubkey", endpoint.getConfiguration().getSubscribeKey());

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
index 3407fcd..4a7b002 100644
--- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
+++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubFireTest.java
@@ -29,7 +29,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static org.apache.camel.component.pubnub.PubNubConstants.TIMETOKEN;
 
 public class PubNubFireTest extends PubNubTestBase {
-    private String endpoint = "pubnub://someChannel?operation=fire&pubnub=#pubnub";
+    private String endpoint = "pubnub:someChannel?operation=fire&pubnub=#pubnub";
 
     @EndpointInject(uri = "mock:result")
     private MockEndpoint mockResult;

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresensTest.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresensTest.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresensTest.java
index 775b233..252a894 100644
--- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresensTest.java
+++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPresensTest.java
@@ -60,7 +60,7 @@ public class PubNubPresensTest extends PubNubTestBase {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() {
-                from("pubnub://mychannel?pubnub=#pubnub&withPresence=true").id("presence-route")
+                from("pubnub:mychannel?pubnub=#pubnub&withPresence=true").id("presence-route")
                     .autoStartup(false)
                     .to("mock:result");
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
index 535f25c..199e0f9 100644
--- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
+++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubPublishTest.java
@@ -31,7 +31,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
 import static org.apache.camel.component.pubnub.PubNubConstants.TIMETOKEN;
 
 public class PubNubPublishTest extends PubNubTestBase {
-    private String endpoint = "pubnub://someChannel?pubnub=#pubnub";
+    private String endpoint = "pubnub:someChannel?pubnub=#pubnub";
 
     @EndpointInject(uri = "mock:result")
     private MockEndpoint mockResult;

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
index 43a4ce8..5202401 100644
--- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
+++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/PubNubSubscriberTest.java
@@ -51,7 +51,7 @@ public class PubNubSubscriberTest extends PubNubTestBase {
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
             public void configure() {
-                from("pubnub://mychannel?pubnub=#pubnub").id("subroute").autoStartup(false)
+                from("pubnub:mychannel?pubnub=#pubnub").id("subroute").autoStartup(false)
                     .to("mock:result");
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
index 1efae17..09fb118 100644
--- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
+++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubGeoLocationExample.java
@@ -23,9 +23,9 @@ public class PubNubGeoLocationExample {
         public void configure() throws Exception {
             from("timer:geotimer")
                 .process(exchange -> exchange.getIn().setBody(new Foo("bar", "TEXT")))
-                .to("pubnub://eon-maps-geolocation-input?operation=fire&publishKey=" + PUBNUB_PUBLISH_KEY + "&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY);
+                .to("pubnub:eon-maps-geolocation-input?operation=fire&publishKey=" + PUBNUB_PUBLISH_KEY + "&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY);
 
-            from("pubnub://eon-map-geolocation-output?subscribeKey=" + PUBNUB_SUBSCRIBE_KEY)
+            from("pubnub:eon-map-geolocation-output?subscribeKey=" + PUBNUB_SUBSCRIBE_KEY)
                 .log("${body}");
         }
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/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 bb24558..554c4fb 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
@@ -35,7 +35,7 @@ public final class PubNubPresenseExample {
     static class PresensRoute extends RouteBuilder {
         @Override
         public void configure() throws Exception {
-            from("pubnub://iot?withPresence=true&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY)
+            from("pubnub:iot?withPresence=true&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY)
                 .log("${body}")
                 .to("mock:result");
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/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
index 74c7d7f..81cb4b8 100644
--- 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
@@ -47,8 +47,8 @@ public final class PubNubSensor2Example {
     }
 
     static class SimulatedDeviceEventGeneratorRoute extends RouteBuilder {
-        private final String deviceEP = "pubnub://iot?uuid=device2&publishKey=" + PUBNUB_PUBLISH_KEY + "&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY;
-        private final String devicePrivateEP = "pubnub://device2private?uuid=device2&publishKey=" + PUBNUB_PUBLISH_KEY + "&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY;
+        private final String deviceEP = "pubnub:iot?uuid=device2&publishKey=" + PUBNUB_PUBLISH_KEY + "&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY;
+        private final String devicePrivateEP = "pubnub:device2private?uuid=device2&publishKey=" + PUBNUB_PUBLISH_KEY + "&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY;
 
         @Override
         public void configure() throws Exception {
@@ -63,7 +63,7 @@ public final class PubNubSensor2Example {
     }
 
     static class PubsubRoute extends RouteBuilder {
-        private static String masterEP = "pubnub://iot?uuid=master&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY + "&publishKey=" + PUBNUB_PUBLISH_KEY;
+        private static String masterEP = "pubnub:iot?uuid=master&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY + "&publishKey=" + PUBNUB_PUBLISH_KEY;
         private static Map<String, String> devices = new ConcurrentHashMap<String, String>();
 
         @Override
@@ -81,7 +81,7 @@ public final class PubNubSensor2Example {
         }
 
         public static class DataProcessorBean {
-            @EndpointInject(uri = "pubnub://iot?uuid=master&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY)
+            @EndpointInject(uri = "pubnub:iot?uuid=master&subscribeKey=" + PUBNUB_SUBSCRIBE_KEY)
             private static ProducerTemplate template;
 
             public static String getUnicastChannelOfDevice() {

http://git-wip-us.apache.org/repos/asf/camel/blob/3bc8d1b1/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
----------------------------------------------------------------------
diff --git a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
index b56b31d..565e069 100644
--- a/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
+++ b/components/camel-pubnub/src/test/java/org/apache/camel/component/pubnub/example/PubNubSensorExample.java
@@ -33,7 +33,7 @@ public final class PubNubSensorExample {
     static class SensorRoute extends RouteBuilder {
         @Override
         public void configure() throws Exception {
-            from("pubnub://pubnub-sensor-network?subscribeKey=sub-c-5f1b7c8e-fbee-11e3-aa40-02ee2ddab7fe").log("${body}").to("mock:result");
+            from("pubnub:pubnub-sensor-network?subscribeKey=sub-c-5f1b7c8e-fbee-11e3-aa40-02ee2ddab7fe").log("${body}").to("mock:result");
         }
     }