This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 94194a7b0ac24a2a7ec0cd1c0c6093c4c340502f Author: Otavio R. Piske <angusyo...@gmail.com> AuthorDate: Sat Feb 17 12:36:04 2024 +0100 CAMEL-20410: documentation fixes for camel-cometd - Fixed samples - Converted to use tabs - Fixed grammar and typos - Fixed punctuation - Added and/or fixed links Signed-off-by: Otavio R. Piske <angusyo...@gmail.com> --- .../src/main/docs/cometd-component.adoc | 45 +++++++++++----------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/components/camel-cometd/src/main/docs/cometd-component.adoc b/components/camel-cometd/src/main/docs/cometd-component.adoc index 5d30bda0066..88e3167234f 100644 --- a/components/camel-cometd/src/main/docs/cometd-component.adoc +++ b/components/camel-cometd/src/main/docs/cometd-component.adoc @@ -14,13 +14,12 @@ *{component-header}* -The Cometd component is a transport for working with the +The Cometd component is a transport mechanism for working with the http://www.mortbay.org/jetty[jetty] implementation of the http://docs.codehaus.org/display/JETTY/Cometd+%28aka+Bayeux%29[cometd/bayeux protocol]. + - Using this component in combination with the dojo toolkit library it's -possible to push Camel messages directly into the browser using an AJAX -based mechanism. + Using this component in combination with the dojo toolkit library, it's +possible to push Camel messages directly into the browser using an AJAX-based mechanism. Maven users will need to add the following dependency to their `pom.xml` for this component: @@ -70,15 +69,13 @@ include::partial$component-endpoint-options.adoc[] include::partial$component-endpoint-headers.adoc[] // component headers: END -== Sample +== Samples -Here is some examples on How to pass the parameters +Below, you can find some examples of how to pass the parameters. -For file (for webapp resources located in the Web Application directory ---> cometd://localhost:8080?resourceBase=file./webapp + - For classpath (when by example the web resources are packaged inside -the webapp folder --> -cometd://localhost:8080?resourceBase=classpath:webapp +For file, for webapp resources located in the Web Application directory --> `cometd://localhost:8080?resourceBase=file./webapp`. + +For classpath, when, for example, the web resources are packaged inside the webapp folder --> `cometd://localhost:8080?resourceBase=classpath:webapp` == Authentication @@ -93,16 +90,20 @@ http://cometd.org/documentation/howtos/authentication[documented here] The Cometd component supports SSL/TLS configuration through the xref:manual::camel-configuration-utilities.adoc[Camel JSSE Configuration Utility]. This utility greatly decreases the amount of -component specific code you need to write and is configurable at the +component-specific code you need to write and is configurable at the endpoint and component levels. The following examples demonstrate how to use the utility with the Cometd component. You need to configure SSL -on the CometdComponent. +on the CometdComponent.x -[[Cometd-Programmaticconfigurationofthecomponent]] -Programmatic configuration of the component +[tabs] +==== +Java:: ++ +Programmatic configuration of the component: ++ [source,java] ------------------------------------------------------------------------------------------------ +---- KeyStoreParameters ksp = new KeyStoreParameters(); ksp.setResource("/users/home/server/keystore.jks"); ksp.setPassword("keystorePassword"); @@ -120,13 +121,12 @@ scp.setTrustManagers(tmp); CometdComponent commetdComponent = getContext().getComponent("cometds", CometdComponent.class); commetdComponent.setSslContextParameters(scp); ------------------------------------------------------------------------------------------------ - -[[Cometd-SpringDSLbasedconfigurationofendpoint]] -Spring DSL based configuration of endpoint +---- +Spring XML:: ++ [source,xml] ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- <camel:sslContextParameters id="sslContextParameters"> <camel:keyManagers @@ -147,8 +147,9 @@ Spring DSL based configuration of endpoint </bean> <to uri="cometds://127.0.0.1:443/service/test?baseResource=file:./target/test-classes/webapp&timeout=240000&interval=0&maxInterval=30000&multiFrameInterval=1500&jsonCommented=true&logLevel=2"/>... ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- +==== include::spring-boot:partial$starter.adoc[]