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 2019/11/21 16:42:59 UTC

[camel] branch master updated: CAMEL-14201: Added a little docs and polished a bit.

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

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


The following commit(s) were added to refs/heads/master by this push:
     new ad84e0d  CAMEL-14201: Added a little docs and polished a bit.
ad84e0d is described below

commit ad84e0d1a236e0249ce88c30a9760024593feba9
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Nov 21 17:11:13 2019 +0100

    CAMEL-14201: Added a little docs and polished a bit.
---
 components/camel-platform-http/pom.xml             |  6 +--
 .../src/main/docs/platform-http.adoc               | 49 +++++++++++++++++++++
 .../platform/http/PlatformHttpEndpoint.java        |  2 +-
 .../dsl/PlatformHttpEndpointBuilderFactory.java    |  8 ++--
 docs/components/modules/ROOT/nav.adoc              |  1 +
 docs/components/modules/ROOT/pages/index.adoc      |  2 +-
 .../modules/ROOT/pages/platform-http.adoc          | 50 ++++++++++++++++++++++
 .../PlatformHttpComponentConfiguration.java        |  3 +-
 8 files changed, 107 insertions(+), 14 deletions(-)

diff --git a/components/camel-platform-http/pom.xml b/components/camel-platform-http/pom.xml
index 54ec5eb3..e05a752 100644
--- a/components/camel-platform-http/pom.xml
+++ b/components/camel-platform-http/pom.xml
@@ -31,7 +31,7 @@
     <artifactId>camel-platform-http</artifactId>
     <packaging>jar</packaging>
     <name>Camel :: Platform HTTP</name>
-    <description>An HTTP service leveraging the given platform's (SB, Quarkus, WildFly, ...) default HTTP server</description>
+    <description>HTTP service leveraging existing runtime platform HTTP server</description>
 
     <dependencies>
         <dependency>
@@ -42,10 +42,6 @@
             <groupId>org.apache.camel</groupId>
             <artifactId>spi-annotations</artifactId>
         </dependency>
-        <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>apt</artifactId>
-        </dependency>
     </dependencies>
 
 </project>
diff --git a/components/camel-platform-http/src/main/docs/platform-http.adoc b/components/camel-platform-http/src/main/docs/platform-http.adoc
new file mode 100644
index 0000000..d1ecc0a
--- /dev/null
+++ b/components/camel-platform-http/src/main/docs/platform-http.adoc
@@ -0,0 +1,49 @@
+= Platform HTTP
+
+*Since Camel 3.0*
+
+The Platform HTTP is used to allow Camel to use the existing HTTP server from the rumtime.
+For example when running Camel on Spring Boot, Quarkus, or other runtimes.
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-platform-http</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+----
+
+// spring-boot-auto-configure options: START
+== Spring Boot Auto-Configuration
+
+When using Spring Boot make sure to use the following Maven dependency to have support for auto configuration:
+
+[source,xml]
+----
+<dependency>
+  <groupId>org.apache.camel.springboot</groupId>
+  <artifactId>camel-platform-http-starter</artifactId>
+  <version>x.x.x</version>
+  <!-- use the same version as your Camel core version -->
+</dependency>
+----
+
+
+The component supports 4 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.component.platform-http.basic-property-binding* | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | Boolean
+| *camel.component.platform-http.bridge-error-handler* | 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
+| *camel.component.platform-http.enabled* | Whether to enable auto configuration of the platform-http component. This is enabled by default. |  | Boolean
+| *camel.component.platform-http.lazy-start-producer* | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is proces [...]
+|===
+// spring-boot-auto-configure options: END
diff --git a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java
index 61fc753..8b78059 100644
--- a/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java
+++ b/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/PlatformHttpEndpoint.java
@@ -32,7 +32,7 @@ import org.apache.camel.support.DefaultEndpoint;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-@UriEndpoint(/* firstVersion = "3.?.0", */ scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:path", label = "http", consumerOnly = true)
+@UriEndpoint(firstVersion = "3.0.0", scheme = "platform-http", title = "Platform HTTP", syntax = "platform-http:path", label = "http", consumerOnly = true)
 public class PlatformHttpEndpoint extends DefaultEndpoint implements AsyncEndpoint, HeaderFilterStrategyAware {
     private static final Logger LOGGER = LoggerFactory.getLogger(PlatformHttpEndpoint.class);
 
diff --git a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PlatformHttpEndpointBuilderFactory.java b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PlatformHttpEndpointBuilderFactory.java
index d33056b..b629c3c 100644
--- a/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PlatformHttpEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/PlatformHttpEndpointBuilderFactory.java
@@ -25,8 +25,7 @@ import org.apache.camel.spi.ExceptionHandler;
 import org.apache.camel.spi.HeaderFilterStrategy;
 
 /**
- * An HTTP service leveraging the given platform's (SB, Quarkus, WildFly, ...)
- * default HTTP server
+ * HTTP service leveraging existing runtime platform HTTP server
  * 
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
@@ -310,11 +309,10 @@ public interface PlatformHttpEndpointBuilderFactory {
     }
     /**
      * Platform HTTP (camel-platform-http)
-     * An HTTP service leveraging the given platform's (SB, Quarkus, WildFly,
-     * ...) default HTTP server
+     * HTTP service leveraging existing runtime platform HTTP server
      * 
      * Category: http
-     * Since:
+     * Since: 3.0
      * Maven coordinates: org.apache.camel:camel-platform-http
      * 
      * Syntax: <code>platform-http:path</code>
diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc
index d53b85c..ec9c811 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -277,6 +277,7 @@
 * xref:pdf-component.adoc[PDF Component]
 * xref:pg-replication-slot-component.adoc[PostgresSQL Replication Slot Component]
 * xref:pgevent-component.adoc[PostgresSQL Event Component]
+* xref:platform-http.adoc[Platform HTTP]
 * xref:lpr-component.adoc[Printer Component]
 * xref:protobuf-dataformat.adoc[Protobuf DataFormat]
 * xref:pubnub-component.adoc[PubNub Component]
diff --git a/docs/components/modules/ROOT/pages/index.adoc b/docs/components/modules/ROOT/pages/index.adoc
index 1e8dc3b..c06978c 100644
--- a/docs/components/modules/ROOT/pages/index.adoc
+++ b/docs/components/modules/ROOT/pages/index.adoc
@@ -460,7 +460,7 @@ Number of Components: 305 in 243 JAR artifacts (0 deprecated)
 
 | xref:pdf-component.adoc[PDF] (camel-pdf) | 2.16 | The pdf components provides the ability to create, modify or extract content from PDF documents.
 
-| xref:platform-http-component.adoc[Platform HTTP] (camel-platform-http) |  | An HTTP service leveraging the given platform's (SB, Quarkus, WildFly, ...) default HTTP server
+| xref:platform-http-component.adoc[Platform HTTP] (camel-platform-http) | 3.0 | HTTP service leveraging existing runtime platform HTTP server
 
 | xref:pgevent-component.adoc[PostgresSQL Event] (camel-pgevent) | 2.15 | The pgevent component allows for producing/consuming PostgreSQL events related to the listen/notify commands.
 
diff --git a/docs/components/modules/ROOT/pages/platform-http.adoc b/docs/components/modules/ROOT/pages/platform-http.adoc
new file mode 100644
index 0000000..fb68195
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/platform-http.adoc
@@ -0,0 +1,50 @@
+= Platform HTTP
+:page-source: components/camel-platform-http/src/main/docs/platform-http.adoc
+
+*Since Camel 3.0*
+
+The Platform HTTP is used to allow Camel to use the existing HTTP server from the rumtime.
+For example when running Camel on Spring Boot, Quarkus, or other runtimes.
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component:
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-platform-http</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+----
+
+// spring-boot-auto-configure options: START
+== Spring Boot Auto-Configuration
+
+When using Spring Boot make sure to use the following Maven dependency to have support for auto configuration:
+
+[source,xml]
+----
+<dependency>
+  <groupId>org.apache.camel.springboot</groupId>
+  <artifactId>camel-platform-http-starter</artifactId>
+  <version>x.x.x</version>
+  <!-- use the same version as your Camel core version -->
+</dependency>
+----
+
+
+The component supports 4 options, which are listed below.
+
+
+
+[width="100%",cols="2,5,^1,2",options="header"]
+|===
+| Name | Description | Default | Type
+| *camel.component.platform-http.basic-property-binding* | Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | Boolean
+| *camel.component.platform-http.bridge-error-handler* | 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
+| *camel.component.platform-http.enabled* | Whether to enable auto configuration of the platform-http component. This is enabled by default. |  | Boolean
+| *camel.component.platform-http.lazy-start-producer* | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is proces [...]
+|===
+// spring-boot-auto-configure options: END
diff --git a/platforms/spring-boot/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/PlatformHttpComponentConfiguration.java b/platforms/spring-boot/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/PlatformHttpComponentConfiguration.java
index 4ff12e7..1e81882 100644
--- a/platforms/spring-boot/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/PlatformHttpComponentConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/PlatformHttpComponentConfiguration.java
@@ -21,8 +21,7 @@ import org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
- * An HTTP service leveraging the given platform's (SB, Quarkus, WildFly, ...)
- * default HTTP server
+ * HTTP service leveraging existing runtime platform HTTP server
  * 
  * Generated by camel-package-maven-plugin - do not edit this file!
  */