You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/08/08 11:16:40 UTC

[camel] 15/21: CAMEL-13792 - Rename components to default names, Camel-netty4-http to camel-netty-http - Fixed refs and test for telegram and webhook components

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b2e16f32383b3c579cd72cb82db91397ec7f99cd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Aug 8 12:34:32 2019 +0200

    CAMEL-13792 - Rename components to default names, Camel-netty4-http to camel-netty-http - Fixed refs and test for telegram and webhook components
---
 .../camel/component/telegram/TelegramWebhookCallTest.java      |  2 +-
 components/camel-webhook/src/main/docs/webhook-component.adoc  |  2 +-
 .../apache/camel/component/webhook/WebhookConfiguration.java   |  2 +-
 .../java/org/apache/camel/component/webhook/WebhookUtils.java  |  2 +-
 .../apache/camel/component/webhook/WebhookBasePathTest.java    | 10 +++++-----
 .../apache/camel/component/webhook/WebhookHttpBindingTest.java |  6 +++---
 .../apache/camel/component/webhook/WebhookMultiRouteTest.java  |  4 ++--
 .../org/apache/camel/component/webhook/WebhookPathTest.java    |  6 +++---
 .../builder/endpoint/dsl/WebhookEndpointBuilderFactory.java    |  2 +-
 .../webhook/springboot/WebhookComponentConfiguration.java      |  2 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/components/camel-telegram/src/test/java/org/apache/camel/component/telegram/TelegramWebhookCallTest.java b/components/camel-telegram/src/test/java/org/apache/camel/component/telegram/TelegramWebhookCallTest.java
index ab028e2..738ff31 100644
--- a/components/camel-telegram/src/test/java/org/apache/camel/component/telegram/TelegramWebhookCallTest.java
+++ b/components/camel-telegram/src/test/java/org/apache/camel/component/telegram/TelegramWebhookCallTest.java
@@ -45,7 +45,7 @@ public class TelegramWebhookCallTest extends TelegramTestSupport {
             mock.expectedBodiesReceived("aho");
             mock.expectedMinimumMessageCount(1);
 
-            template().sendBodyAndHeader("netty4-http:" + url, content, Exchange.CONTENT_TYPE, "application/json");
+            template().sendBodyAndHeader("netty-http:" + url, content, Exchange.CONTENT_TYPE, "application/json");
             mock.assertIsSatisfied();
         }
     }
diff --git a/components/camel-webhook/src/main/docs/webhook-component.adoc b/components/camel-webhook/src/main/docs/webhook-component.adoc
index caf8eb8..4c88331 100644
--- a/components/camel-webhook/src/main/docs/webhook-component.adoc
+++ b/components/camel-webhook/src/main/docs/webhook-component.adoc
@@ -77,7 +77,7 @@ with the following path and query parameters:
 | Name | Description | Default | Type
 | *webhookAutoRegister* (common) | Automatically register the webhook at startup and unregister it on shutdown. | true | boolean
 | *webhookBasePath* (common) | The first (base) path element where the webhook will be exposed. It's a good practice to set it to a random string, so that it cannot be guessed by unauthorized parties. |  | String
-| *webhookComponentName* (common) | The Camel Rest component to use for the REST transport, such as netty4-http. |  | String
+| *webhookComponentName* (common) | The Camel Rest component to use for the REST transport, such as netty-http. |  | String
 | *webhookExternalUrl* (common) | The URL of the current service as seen by the webhook provider |  | String
 | *webhookPath* (common) | The path where the webhook endpoint will be exposed (relative to basePath, if any) |  | 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
diff --git a/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookConfiguration.java b/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookConfiguration.java
index 6ab3467..be3a58c 100644
--- a/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookConfiguration.java
+++ b/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookConfiguration.java
@@ -202,7 +202,7 @@ public class WebhookConfiguration implements Cloneable {
     }
 
     /**
-     * The Camel Rest component to use for the REST transport, such as netty4-http.
+     * The Camel Rest component to use for the REST transport, such as netty-http.
      */
     public void setWebhookComponentName(String webhookComponentName) {
         this.webhookComponentName = webhookComponentName;
diff --git a/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookUtils.java b/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookUtils.java
index 25d2fe7..acdc28c 100644
--- a/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookUtils.java
+++ b/components/camel-webhook/src/main/java/org/apache/camel/component/webhook/WebhookUtils.java
@@ -28,7 +28,7 @@ import org.apache.camel.spi.RestConsumerFactory;
  */
 public final class WebhookUtils {
 
-    private static final String[] DEFAULT_REST_CONSUMER_COMPONENTS = new String[]{"coap", "netty4-http", "jetty", "restlet", "servlet", "undertow"};
+    private static final String[] DEFAULT_REST_CONSUMER_COMPONENTS = new String[]{"coap", "netty-http", "jetty", "restlet", "servlet", "undertow"};
 
     private WebhookUtils() {
     }
diff --git a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookBasePathTest.java b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookBasePathTest.java
index de810af..ec7da63 100644
--- a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookBasePathTest.java
+++ b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookBasePathTest.java
@@ -28,31 +28,31 @@ public class WebhookBasePathTest extends WebhookTestBase {
 
     @Test
     public void testComponentPath() {
-        String result = template.requestBody("netty4-http:http://localhost:" + port + "/base/uri0", "", String.class);
+        String result = template.requestBody("netty-http:http://localhost:" + port + "/base/uri0", "", String.class);
         assertEquals("msg: webhook", result);
     }
 
     @Test
     public void testUriPath() {
-        String result = template.requestBody("netty4-http:http://localhost:" + port + "/base/uri", "", String.class);
+        String result = template.requestBody("netty-http:http://localhost:" + port + "/base/uri", "", String.class);
         assertEquals("uri: webhook", result);
     }
 
     @Test
     public void testAutoPath() {
-        String result = template.requestBody("netty4-http:http://localhost:" + port + "/base"
+        String result = template.requestBody("netty-http:http://localhost:" + port + "/base"
                 + WebhookConfiguration.computeDefaultPath("wb-delegate://auto"), "", String.class);
         assertEquals("auto: webhook", result);
     }
 
     @Test(expected = CamelExecutionException.class)
     public void testRootPathError() {
-        template.requestBody("netty4-http:http://localhost:" + port, "", String.class);
+        template.requestBody("netty-http:http://localhost:" + port, "", String.class);
     }
 
     @Test(expected = CamelExecutionException.class)
     public void testRootBasePathError() {
-        template.requestBody("netty4-http:http://localhost:" + port + "/base/", "", String.class);
+        template.requestBody("netty-http:http://localhost:" + port + "/base/", "", String.class);
     }
 
     @Override
diff --git a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookHttpBindingTest.java b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookHttpBindingTest.java
index d044534..e2b6ee7 100644
--- a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookHttpBindingTest.java
+++ b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookHttpBindingTest.java
@@ -31,18 +31,18 @@ public class WebhookHttpBindingTest extends WebhookTestBase {
 
     @Test
     public void testWrapper() {
-        String result = template.requestBody("netty4-http:http://localhost:" + port
+        String result = template.requestBody("netty-http:http://localhost:" + port
                 + WebhookConfiguration.computeDefaultPath("wb-delegate://xx"), "", String.class);
         assertEquals("msg: webhook", result);
 
-        result = template.requestBodyAndHeader("netty4-http:http://localhost:" + port
+        result = template.requestBodyAndHeader("netty-http:http://localhost:" + port
                 + WebhookConfiguration.computeDefaultPath("wb-delegate://xx"), "", Exchange.HTTP_METHOD, HttpMethods.PUT, String.class);
         assertEquals("msg: webhook", result);
     }
 
     @Test(expected = CamelExecutionException.class)
     public void testGetError() {
-        template.requestBodyAndHeader("netty4-http:http://localhost:" + port, "",
+        template.requestBodyAndHeader("netty-http:http://localhost:" + port, "",
                 Exchange.HTTP_METHOD, HttpMethods.GET, String.class);
     }
 
diff --git a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookMultiRouteTest.java b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookMultiRouteTest.java
index c401171..5a0b0c3 100644
--- a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookMultiRouteTest.java
+++ b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookMultiRouteTest.java
@@ -26,11 +26,11 @@ public class WebhookMultiRouteTest extends WebhookTestBase {
 
     @Test
     public void testMultiRoute() {
-        String result = template.requestBody("netty4-http:http://localhost:" + port
+        String result = template.requestBody("netty-http:http://localhost:" + port
                 + WebhookConfiguration.computeDefaultPath("wb-delegate://yy"), "", String.class);
         assertEquals("uri: webhook", result);
 
-        result = template.requestBody("netty4-http:http://localhost:" + port
+        result = template.requestBody("netty-http:http://localhost:" + port
                 + WebhookConfiguration.computeDefaultPath("wb-delegate://xx"), "", String.class);
         assertEquals("msg: webhook", result);
     }
diff --git a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookPathTest.java b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookPathTest.java
index 0bb3ea9..a8a07f8f 100644
--- a/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookPathTest.java
+++ b/components/camel-webhook/src/test/java/org/apache/camel/component/webhook/WebhookPathTest.java
@@ -28,19 +28,19 @@ public class WebhookPathTest extends WebhookTestBase {
 
     @Test
     public void testComponentPath() {
-        String result = template.requestBody("netty4-http:http://localhost:" + port + "/comp", "", String.class);
+        String result = template.requestBody("netty-http:http://localhost:" + port + "/comp", "", String.class);
         assertEquals("msg: webhook", result);
     }
 
     @Test
     public void testUriPath() {
-        String result = template.requestBody("netty4-http:http://localhost:" + port + "/uri", "", String.class);
+        String result = template.requestBody("netty-http:http://localhost:" + port + "/uri", "", String.class);
         assertEquals("uri: webhook", result);
     }
 
     @Test(expected = CamelExecutionException.class)
     public void testRootPathError() {
-        template.requestBody("netty4-http:http://localhost:" + port, "", String.class);
+        template.requestBody("netty-http:http://localhost:" + port, "", String.class);
     }
 
     @Override
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/WebhookEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/WebhookEndpointBuilderFactory.java
index ae7baa7..21aa209 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/WebhookEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/WebhookEndpointBuilderFactory.java
@@ -80,7 +80,7 @@ public interface WebhookEndpointBuilderFactory {
         }
         /**
          * The Camel Rest component to use for the REST transport, such as
-         * netty4-http.
+         * netty-http.
          * 
          * The option is a: <code>java.lang.String</code> type.
          * 
diff --git a/platforms/spring-boot/components-starter/camel-webhook-starter/src/main/java/org/apache/camel/component/webhook/springboot/WebhookComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-webhook-starter/src/main/java/org/apache/camel/component/webhook/springboot/WebhookComponentConfiguration.java
index 9353caf..5a96e9d 100644
--- a/platforms/spring-boot/components-starter/camel-webhook-starter/src/main/java/org/apache/camel/component/webhook/springboot/WebhookComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-webhook-starter/src/main/java/org/apache/camel/component/webhook/springboot/WebhookComponentConfiguration.java
@@ -93,7 +93,7 @@ public class WebhookComponentConfiguration
         private RestConfiguration restConfiguration;
         /**
          * The Camel Rest component to use for the REST transport, such as
-         * netty4-http.
+         * netty-http.
          */
         private String webhookComponentName;
         /**