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 be56dcd5adb960ae46f8b8ce7b7180afeb0f251f Author: Andrea Cosentino <[email protected]> AuthorDate: Fri Mar 20 10:57:41 2020 +0100 CAMEL-14738 - Added pages for website after regen --- .../modules/ROOT/pages/platform-http-vertx.adoc | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/docs/components/modules/ROOT/pages/platform-http-vertx.adoc b/docs/components/modules/ROOT/pages/platform-http-vertx.adoc new file mode 100644 index 0000000..53aa1c1 --- /dev/null +++ b/docs/components/modules/ROOT/pages/platform-http-vertx.adoc @@ -0,0 +1,46 @@ += PlatformHttp VertX +:page-source: components/camel-platform-http-vertx/src/main/docs/platform-http-vertx.adoc + +*Since Camel 3.2* + +The camel-platform-http-vertx is a Vert.x based implementation of the `PlatformHttp` SPI. + +[NOTE] +==== +At this time this component is an experiment so use it with care. +==== + +== Vert.x Route +This implementation will by default lookup an instance of `VertxPlatformHttpRouter` on the registry however you can +configure an existing instance using the getter/setter on the `VertxPlatformHttpEngine` class. + +== Auto detection from classpath + +To use this implementation all you need to do is to add the `camel-platform-http-vertx` dependency to the classpath, +and the platform http component should auto-detect this. + +== VertxPlatformHttpServer + +In addition to the implementation of the `PlatformHttp` SPI based on Vert.x, this module provides a Vert.x based HTTP +server compatible with the `VertxPlatformHttpEngine`: + +[source,java] +---- +final int port = AvailablePortFinder.getNextAvailable(); +final CamelContext context = new DefaultCamelContext(); + +VertxPlatformHttpServerConfiguration conf = new VertxPlatformHttpServerConfiguration(); +conf.setBindPort(port); + +context.addService(new VertxPlatformHttpServer(context, conf), true, true); +context.addRoutes(new RouteBuilder() { + @Override + public void configure() throws Exception { + from("platform-http:/test") + .routeId("get") + .setBody().constant("Hello from Camel's PlatformHttp service"); + } +}); + +context.start(); +---- \ No newline at end of file
