From commits-return-61657-archive-asf-public=cust-asf.ponee.io@camel.apache.org Fri Mar 2 12:01:26 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id DD30118067A for ; Fri, 2 Mar 2018 12:01:23 +0100 (CET) Received: (qmail 21190 invoked by uid 500); 2 Mar 2018 11:01:22 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 21037 invoked by uid 99); 2 Mar 2018 11:01:22 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Mar 2018 11:01:22 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id E0A9B827C7; Fri, 2 Mar 2018 11:01:21 +0000 (UTC) Date: Fri, 02 Mar 2018 11:01:21 +0000 To: "commits@camel.apache.org" Subject: [camel] 01/03: CAMEL-12297 Miscellaneous fixes to AsciiDoc format and layout MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit From: acosentino@apache.org In-Reply-To: <151998848028.15391.106801055138009715@gitbox.apache.org> References: <151998848028.15391.106801055138009715@gitbox.apache.org> X-Git-Host: gitbox.apache.org X-Git-Repo: camel X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Rev: b6bce66ffe55517e42c1addac8c1c0485422fddf X-Git-NotificationType: diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated Message-Id: <20180302110121.E0A9B827C7@gitbox.apache.org> 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 b6bce66ffe55517e42c1addac8c1c0485422fddf Author: Fintan Bolton AuthorDate: Wed Feb 28 16:46:29 2018 +0100 CAMEL-12297 Miscellaneous fixes to AsciiDoc format and layout --- camel-core/src/main/docs/controlbus-component.adoc | 1 - camel-core/src/main/docs/file-component.adoc | 2 +- .../camel-amqp/src/main/docs/amqp-component.adoc | 40 +++--- .../src/main/docs/azure-blob-component.adoc | 2 +- .../src/main/docs/azure-queue-component.adoc | 4 +- .../src/main/docs/cql-component.adoc | 16 +-- components/camel-cdi/src/main/docs/cdi.adoc | 4 +- .../src/main/docs/eventadmin-component.adoc | 1 + .../camel-ftp/src/main/docs/ftp-component.adoc | 142 ++++++++++----------- .../src/main/docs/ganglia-component.adoc | 30 ++--- .../camel-http/src/main/docs/http-component.adoc | 126 +++++++++--------- components/camel-ignite/src/main/docs/ignite.adoc | 13 +- .../src/main/docs/influxdb-component.adoc | 2 +- .../src/main/docs/jetty-component.adoc | 2 +- .../camel-jmx/src/main/docs/jmx-component.adoc | 70 +++++----- .../src/main/docs/kubernetes-component.adoc | 18 +-- .../camel-kubernetes/src/main/docs/kubernetes.adoc | 4 +- .../camel-mina2/src/main/docs/mina2-component.adoc | 4 +- .../camel-mllp/src/main/docs/mllp-component.adoc | 17 +-- .../src/main/docs/mongodb-component.adoc | 62 ++++----- .../src/main/docs/mongodb3-component.adoc | 62 ++++----- .../camel-netty/src/main/docs/netty-component.adoc | 3 +- .../src/main/docs/netty4-component.adoc | 3 +- .../src/main/docs/olingo4-component.adoc | 2 - .../src/main/docs/salesforce-component.adoc | 121 +++++++++--------- .../camel-sql/src/main/docs/sql-component.adoc | 10 +- .../src/main/docs/syslog-dataformat.adoc | 8 +- .../src/main/docs/thrift-dataformat.adoc | 25 ++-- 28 files changed, 390 insertions(+), 404 deletions(-) diff --git a/camel-core/src/main/docs/controlbus-component.adoc b/camel-core/src/main/docs/controlbus-component.adoc index f283c20..c227f98 100644 --- a/camel-core/src/main/docs/controlbus-component.adoc +++ b/camel-core/src/main/docs/controlbus-component.adoc @@ -106,7 +106,6 @@ with the following path and query parameters: You can append query options to the URI in the following format, `?option=value&option=value&...` -=== Samples === Using route command diff --git a/camel-core/src/main/docs/file-component.adoc b/camel-core/src/main/docs/file-component.adoc index d6b7ae3..11a00c2 100644 --- a/camel-core/src/main/docs/file-component.adoc +++ b/camel-core/src/main/docs/file-component.adoc @@ -272,7 +272,7 @@ The following headers are supported by this component: |`CamelFileName` |Specifies the name of the file to write (relative to the endpoint directory). This name can be a `String`; a `String` with a -<> or <> +<> or <> expression; or an Expression object. If it's `null` then Camel will auto-generate a filename based on the message unique ID. diff --git a/components/camel-amqp/src/main/docs/amqp-component.adoc b/components/camel-amqp/src/main/docs/amqp-component.adoc index 36bf08c..230c7cc 100644 --- a/components/camel-amqp/src/main/docs/amqp-component.adoc +++ b/components/camel-amqp/src/main/docs/amqp-component.adoc @@ -15,20 +15,20 @@ Maven users will need to add the following dependency to their `pom.xml` for this component: [source,xml] ------------------------------------------------------------------------------------------------- +---- org.apache.camel camel-amqp ${camel.version} ------------------------------------------------------------------------------------------------- +---- ### URI format [source,java] ---------------------------------------------- +---- amqp:[queue:|topic:]destinationName[?options] ---------------------------------------------- +---- ### AMQP Options @@ -264,7 +264,7 @@ former is almost identical to the latter: *Using AMQP component* [source,java] ------------------------------------- +---- // Consuming from AMQP queue from("amqp:queue:incoming"). to(...); @@ -272,7 +272,7 @@ from("amqp:queue:incoming"). // Sending message to the AMQP topic from(...). to("amqp:topic:notify"); ------------------------------------- +---- ### Configuring AMQP component @@ -283,9 +283,9 @@ return the AMQP 1.0 component with the pre-configured topic prefix:  *Creating AMQP 1.0 component* [source,java] ------------------------------------------------------------------------------------------ +---- AMQPComponent amqp = AMQPComponent.amqp10Component("amqp://guest:guest@localhost:5672"); ------------------------------------------------------------------------------------------ +---- Keep in mind that starting from the Camel 2.17 the `AMQPComponent#amqp10Component(String connectionURI)` factory @@ -295,11 +295,11 @@ method has been deprecated on the behalf of the *Creating AMQP 1.0 component* [source,java] --------------------------------------------------------------------------------------------------------- +---- AMQPComponent amqp = AMQPComponent.amqpComponent("amqp://localhost:5672");   AMQPComponent authorizedAmqp = AMQPComponent.amqpComponent("amqp://localhost:5672", "user", "password"); --------------------------------------------------------------------------------------------------------- +---- Starting from Camel 2.17, in order to automatically configure the AMQP component, you can also add an instance @@ -309,7 +309,7 @@ registry. For example for Spring Boot you just have to define bean: *AMQP connection details auto-configuration* [source,java] -------------------------------------------------------------------------------------- +---- @Bean AMQPConnectionDetails amqpConnection() { return new AMQPConnectionDetails("amqp://localhost:5672"); @@ -319,19 +319,19 @@ AMQPConnectionDetails amqpConnection() { AMQPConnectionDetails securedAmqpConnection() { return new AMQPConnectionDetails("amqp://lcoalhost:5672", "username", "password"); } -------------------------------------------------------------------------------------- +---- Likewise, you can also use CDI producer methods when using Camel-CDI *AMQP connection details auto-configuration for CDI* [source,java] -------------------------------------------------------------------------------------- +---- @Produces AMQPConnectionDetails amqpConnection() { return new AMQPConnectionDetails("amqp://localhost:5672"); } -------------------------------------------------------------------------------------- +---- You can also rely on the <> to read the AMQP connection details. Factory @@ -342,7 +342,7 @@ snippet below: *AMQP connection details auto-configuration* [source,java] ------------------------------------------------ +---- export AMQP_SERVICE_HOST = "mybroker.com" export AMQP_SERVICE_PORT = "6666" export AMQP_SERVICE_USERNAME = "username" @@ -354,16 +354,16 @@ export AMQP_SERVICE_PASSWORD = "password" AMQPConnectionDetails amqpConnection() { return AMQPConnectionDetails.discoverAMQP(); } ------------------------------------------------ +---- *Enabling AMQP specific options* If you, for example, need to enable `amqp.traceFrames` you can do that by appending the option to your URI, like the following example: [source,java] --------------------------------------------------------------------------------------------------------- +---- AMQPComponent amqp = AMQPComponent.amqpComponent("amqp://localhost:5672?amqp.traceFrames=true"); --------------------------------------------------------------------------------------------------------- +---- For reference take a look at the https://qpid.apache.org/releases/qpid-jms-0.29.0/docs/index.html[QPID JMS client configuration] @@ -373,7 +373,7 @@ To have using topics working with `camel-amqp` you need to configure the component to use `topic://` as topic prefix, as shown below: [source,java] -------------------------------------------------------------------------------------------------------------------------------- +---- @@ -382,7 +382,7 @@ component to use `topic://` as topic prefix, as shown below: -------------------------------------------------------------------------------------------------------------------------------- +---- Keep in mind that both  `AMQPComponent#amqpComponent()` methods and `AMQPConnectionDetails` pre-configure the component with the topic diff --git a/components/camel-azure/src/main/docs/azure-blob-component.adoc b/components/camel-azure/src/main/docs/azure-blob-component.adoc index 7fa3ee9..44352db 100644 --- a/components/camel-azure/src/main/docs/azure-blob-component.adoc +++ b/components/camel-azure/src/main/docs/azure-blob-component.adoc @@ -108,7 +108,7 @@ You have to provide the containerOrBlob name and the credentials if the private [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= |Header |Type |Description - +| | | |======================================================================= #### Message headers set by the Azure Storage Blob Service producer diff --git a/components/camel-azure/src/main/docs/azure-queue-component.adoc b/components/camel-azure/src/main/docs/azure-queue-component.adoc index e17f11b..d27fb1c 100644 --- a/components/camel-azure/src/main/docs/azure-queue-component.adoc +++ b/components/camel-azure/src/main/docs/azure-queue-component.adoc @@ -99,7 +99,7 @@ You have to provide the containerAndQueue URI and the credentials. [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= |Header |Type |Description - +| | | |======================================================================= #### Message headers set by the Azure Storage Queue Service producer @@ -107,6 +107,7 @@ You have to provide the containerAndQueue URI and the credentials. [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= |Header |Type |Description +| | | |======================================================================= #### Message headers set by the Azure Storage Queue Service producer consumer @@ -114,6 +115,7 @@ You have to provide the containerAndQueue URI and the credentials. [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= |Header |Type |Description +| | | |======================================================================= #### Azure Queue Client configuration diff --git a/components/camel-cassandraql/src/main/docs/cql-component.adoc b/components/camel-cassandraql/src/main/docs/cql-component.adoc index 0aa4e6b..9a0b8a1 100644 --- a/components/camel-cassandraql/src/main/docs/cql-component.adoc +++ b/components/camel-cassandraql/src/main/docs/cql-component.adoc @@ -31,7 +31,7 @@ Maven users will need to add the following dependency to their ------------------------------------------------------------ -### URI format +=== URI format The endpoint can initiate the Cassandra connection or use an existing one. @@ -51,7 +51,7 @@ To fine tune the Cassandra connection (SSL options, pooling options, load balancing policy, retry policy, reconnection policy...), create your own Cluster instance and give it to the Camel endpoint. -### Cassandra Options +=== Cassandra Options // component options: START @@ -121,9 +121,9 @@ with the following path and query parameters: // endpoint options: END -### Messages +=== Messages -### Incoming Message +==== Incoming Message The Camel Cassandra endpoint expects a bunch of simple objects (`Object` or `Object[]` or `Collection`) which will be bound to the CQL @@ -135,7 +135,7 @@ Headers: * `CamelCqlQuery` (optional, `String` or `RegularStatement`): CQL query either as a plain String or built using the `QueryBuilder`. -### Outgoing Message +==== Outgoing Message The Camel Cassandra endpoint produces one or many a Cassandra Row objects depending on the `resultSetConversionStrategy`: @@ -148,7 +148,7 @@ objects depending on the `resultSetConversionStrategy`: * Anything else, if `resultSetConversionStrategy` is a custom implementation of the `ResultSetConversionStrategy` -### Repositories +=== Repositories Cassandra can be used to store message keys or messages for the idempotent and aggregation EIP. @@ -159,7 +159,7 @@ anti-patterns queues and queue like datasets]. It's advised to use LeveledCompaction and a small GC grace setting for these tables to allow tombstoned rows to be removed quickly. -### Idempotent repository +=== Idempotent repository The `NamedCassandraIdempotentRepository` stores messages keys in a Cassandra table like this: @@ -201,7 +201,7 @@ Alternatively, the `CassandraIdempotentRepository` does not have a `LOCAL_QUORUM`… |======================================================================= -### Aggregation repository +=== Aggregation repository The `NamedCassandraAggregationRepository` stores exchanges by correlation key in a Cassandra table like this: diff --git a/components/camel-cdi/src/main/docs/cdi.adoc b/components/camel-cdi/src/main/docs/cdi.adoc index f1b61da..b270022 100644 --- a/components/camel-cdi/src/main/docs/cdi.adoc +++ b/components/camel-cdi/src/main/docs/cdi.adoc @@ -538,8 +538,8 @@ from("direct:inbound").bean("foo"); ==== Referring beans from Endpoint URIs When configuring endpoints using the URI syntax you can refer to beans -in the Registry using the `#` notation. If the URI -parameter value starts with a `#` sign then Camel CDI will lookup for a +in the Registry using the `pass:[#]` notation. If the URI +parameter value starts with a `pass:[#]` sign then Camel CDI will lookup for a bean of the given type by name, e.g.: [source,java] diff --git a/components/camel-eventadmin/src/main/docs/eventadmin-component.adoc b/components/camel-eventadmin/src/main/docs/eventadmin-component.adoc index 00628c3..16ff012 100644 --- a/components/camel-eventadmin/src/main/docs/eventadmin-component.adoc +++ b/components/camel-eventadmin/src/main/docs/eventadmin-component.adoc @@ -84,6 +84,7 @@ with the following path and query parameters: [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= |Name |Type |Message |Description +| | | |======================================================================= ### Message body diff --git a/components/camel-ftp/src/main/docs/ftp-component.adoc b/components/camel-ftp/src/main/docs/ftp-component.adoc index d35d44e..9f2b097 100644 --- a/components/camel-ftp/src/main/docs/ftp-component.adoc +++ b/components/camel-ftp/src/main/docs/ftp-component.adoc @@ -17,24 +17,24 @@ Maven users will need to add the following dependency to their `pom.xml` for this component: [source,xml] ------------------------------------------------------------------------ +---- org.apache.camel camel-ftp x.x.xSee the documentation of the Apache Commons ------------------------------------------------------------------------ +---- -### URI format +=== URI format [source,java] ---------------------------------------------------------- +---- ftp://[username@]hostname[:port]/directoryname[?options] sftp://[username@]hostname[:port]/directoryname[?options] ftps://[username@]hostname[:port]/directoryname[?options] ---------------------------------------------------------- +---- Where *directoryname* represents the underlying directory. The directory name is a relative path. Absolute path's is *not* supported. The @@ -68,7 +68,7 @@ The FTPS component is only available in Camel 2.2 or newer. + support for the Transport Layer Security (TLS) and the Secure Sockets Layer (SSL) cryptographic protocols. -### URI Options +=== URI Options The options below are exclusive for the FTP component. @@ -219,7 +219,7 @@ with the following path and query parameters: -### FTPS component default trust store +=== FTPS component default trust store When using the `ftpClient.` properties related to SSL with the FTPS component, the trust store accept all certificates. If you only want @@ -238,17 +238,17 @@ For example to set the `setDataTimeout` on the `FTPClient` to 30 seconds you can do: [source,java] --------------------------------------------------------------------------------------- +---- from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000").to("bean:foo"); --------------------------------------------------------------------------------------- +---- You can mix and match and have use both prefixes, for example to configure date format or timezones. [source,java] ----------------------------------------------------------------------------------------------------------------------------- +---- from("ftp://foo@myserver?password=secret&ftpClient.dataTimeout=30000&ftpClientConfig.serverLanguageCode=fr").to("bean:foo"); ----------------------------------------------------------------------------------------------------------------------------- +---- You can have as many of these options as you like. @@ -263,32 +263,33 @@ lookup in the Registry for it. For example: [source,java] --------------------------------------------------------------------------- +---- --------------------------------------------------------------------------- +---- And then let Camel lookup this bean when you use the # notation in the url. [source,java] ------------------------------------------------------------------------------------- +---- from("ftp://foo@myserver?password=secret&ftpClientConfig=#myConfig").to("bean:foo"); ------------------------------------------------------------------------------------- +---- -### More URI options +// REVISIT - Empty sections are bad! +//=== More URI options -### Examples +=== Examples `ftp://someone@someftpserver.com/public/upload/images/holiday2008?password=secret&binary=true` + `ftp://someoneelse@someotherftpserver.co.uk:12049/reports/2008/password=secret&binary=false` + `ftp://publicftpserver.com/download` -### Concurrency +=== Concurrency FTP Consumer does not support concurrency @@ -299,15 +300,13 @@ is only a single endpoint that does not support concurrent consumers. The FTP producer does *not* have this issue, it supports concurrency. -### More information +=== More information This component is an extension of the File component. So there are more samples and details on the File component page. -==== - -### Default when consuming files +=== Default when consuming files The FTP consumer will by default leave the consumed files untouched on the remote FTP server. You have to configure it @@ -320,7 +319,7 @@ default move files to a `.camel` sub directory. The reason Camel does *not* do this by default for the FTP consumer is that it may lack permissions by default to be able to move or delete files. -#### limitations +==== limitations The option *readLock* can be used to force Camel *not* to consume files that is currently in the progress of being written. However, this option @@ -336,7 +335,7 @@ restricted to the FTP_ROOT folder. That prevents you from moving files outside the FTP area. If you want to move files to another area you can use soft links and move files into a soft linked folder. -### Message Headers +=== Message Headers The following message headers can be used to affect the behavior of the component @@ -375,7 +374,7 @@ In addition the FTP/FTPS consumer and producer will enrich the Camel |`CamelFtpReplyString` | *Camel 2.11.1:* The FTP client reply string |======================================================================= -### About timeouts +=== About timeouts The two set of libraries (see top) has different API for setting timeout. You can use the `connectTimeout` option for both of them to set @@ -386,7 +385,7 @@ a timeout in millis to establish a network connection. An individual for FTP/FTSP as the data timeout, which corresponds to the `ftpClient.dataTimeout` value. All timeout values are in millis. -### Using Local Work Directory +=== Using Local Work Directory Camel supports consuming from remote FTP servers and downloading the files directly into a local work directory. This avoids reading the @@ -403,26 +402,19 @@ So if you want to download files from a remote FTP server and store it as files then you need to route to a file endpoint such as: [source,java] ------------------------------------------------------------------------------------------------- +---- from("ftp://someone@someserver.com?password=secret&localWorkDirectory=/tmp").to("file://inbox"); ------------------------------------------------------------------------------------------------- +---- -[Tip] +[TIP, caption='Optimization by renaming work file'] ==== - *Optimization by renaming work file* - -The route above is ultra efficient as it avoids reading the entire file -content into memory. It will download the remote file directly to a -local file stream. The `java.io.File` handle is then used as the -Exchange body. The file producer leverages this fact -and can work directly on the work file `java.io.File` handle and perform -a `java.io.File.rename` to the target filename. As Camel knows it's a -local work file, it can optimize and use a rename instead of a file -copy, as the work file is meant to be deleted anyway. - +The route above is ultra efficient as it avoids reading the entire file content into memory. +It will download the remote file directly to a local file stream. +The `java.io.File` handle is then used as the Exchange body. The file producer leverages this fact and can work directly on the work file `java.io.File` handle and perform a `java.io.File.rename` to the target filename. +As Camel knows it's a local work file, it can optimize and use a rename instead of a file copy, as the work file is meant to be deleted anyway. ==== -### Stepwise changing directories +=== Stepwise changing directories Camel FTP can operate in two modes in terms of traversing directories when consuming files (eg downloading) or @@ -453,21 +445,21 @@ example. Suppose we have the following directory structure on the remote FTP server we need to traverse and download files: [source,java] --------------- +---- / /one /one/two /one/two/sub-a /one/two/sub-b --------------- +---- And that we have a file in each of sub-a (a.txt) and sub-b (b.txt) folder. -#### Using stepwise=true (default mode) +==== Using stepwise=true (default mode) [source,java] ----------------------------------------------------------- +---- TYPE A 200 Type set to A PWD @@ -549,15 +541,15 @@ CWD / QUIT 221 Goodbye disconnected. ----------------------------------------------------------- +---- As you can see when stepwise is enabled, it will traverse the directory structure using CD xxx. -#### Using stepwise=false +==== Using stepwise=false [source,java] -------------------------------------------- +---- 230 Logged on TYPE A 200 Type set to A @@ -596,12 +588,12 @@ RETR one/two/sub-b/b.txt QUIT 221 Goodbye disconnected. -------------------------------------------- +---- As you can see when not using stepwise, there are no CD operation invoked at all. -### Samples +=== Samples In the sample below we set up Camel to download all the reports from the FTP server once every hour (60 min) as BINARY content and store it as @@ -610,32 +602,32 @@ files on the local file system. And the route using Spring DSL: [source,xml] ------------------------------------------------------------------------------------------------------- +---- ------------------------------------------------------------------------------------------------------- +---- -#### Consuming a remote FTPS server (implicit SSL) and client authentication +==== Consuming a remote FTPS server (implicit SSL) and client authentication [source,java] --------------------------------------------------------------------------------------------------- +---- from("ftps://admin@localhost:2222/public/camel?password=admin&securityProtocol=SSL&isImplicit=true &ftpClient.keyStore.file=./src/test/resources/server.jks &ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password") .to("bean:foo"); --------------------------------------------------------------------------------------------------- +---- -#### Consuming a remote FTPS server (explicit TLS) and a custom trust store configuration +==== Consuming a remote FTPS server (explicit TLS) and a custom trust store configuration [source,java] ----------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- from("ftps://admin@localhost:2222/public/camel?password=admin&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.password=password") .to("bean:foo"); ----------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- -### Filter using `org.apache.camel.component.file.GenericFileFilter` +=== Filter using `org.apache.camel.component.file.GenericFileFilter` Camel supports pluggable filtering strategies. This strategy it to use the build in `org.apache.camel.component.file.GenericFileFilter` in @@ -650,7 +642,7 @@ reference our filter (using `#` notation) that we have defined in the spring XML file: [source,xml] ---------------------------------------------------------------------------------------- +---- @@ -658,9 +650,9 @@ spring XML file: ---------------------------------------------------------------------------------------- +---- -### Filtering using ANT path matcher +=== Filtering using ANT path matcher The ANT path matcher is a filter that is shipped out-of-the-box in the *camel-spring* jar. So you need to depend on *camel-spring* if you are @@ -677,13 +669,13 @@ The file paths are matched with the following rules: The sample below demonstrates how to use it: -### Using a proxy with SFTP +=== Using a proxy with SFTP To use an HTTP proxy to connect to your remote host, you can configure your route in the following way: [source,xml] -------------------------------------------------------------------------------------- +---- @@ -694,13 +686,13 @@ your route in the following way: -------------------------------------------------------------------------------------- +---- You can also assign a user name and password to the proxy, if necessary. Please consult the documentation for `com.jcraft.jsch.Proxy` to discover all options. -### Setting preferred SFTP authentication method +=== Setting preferred SFTP authentication method If you want to explicitly specify the list of authentication methods that should be used by `sftp` component, use `preferredAuthentications` @@ -710,12 +702,12 @@ in the case when no public key is available, use the following route configuration: [source,java] -------------------------------------------------------------------------------------------------------------- +---- from("sftp://localhost:9999/root?username=admin&password=admin&preferredAuthentications=publickey,password"). to("bean:processFile"); -------------------------------------------------------------------------------------------------------------- +---- -### Consuming a single file using a fixed name +=== Consuming a single file using a fixed name When you want to download a single file and knows the file name, you can use `fileName=myFileName.txt` to tell Camel the name of the file to @@ -735,10 +727,10 @@ For example to have a Camel route that pickup a single file, and delete it after use you can do [source,java] -------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- from("ftp://admin@localhost:21/nolist/?password=admin&stepwise=false&useList=false&ignoreFileNotFoundOrPermissionError=true&fileName=report.txt&delete=true") .to("activemq:queue:report"); -------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- Notice that we have use all the options we talked above above. @@ -746,16 +738,16 @@ You can also use this with `ConsumerTemplate`. For example to download a single file (if it exists) and grab the file content as a String type: [source,java] ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +---- String data = template.retrieveBodyNoWait("ftp://admin@localhost:21/nolist/?password=admin&stepwise=false&useList=false&ignoreFileNotFoundOrPermissionError=true&fileName=report.txt&delete=true", String.class); ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ +---- -### Debug logging +=== Debug logging This component has log level *TRACE* that can be helpful if you have problems. -### See Also +=== See Also * Configuring Camel * Component diff --git a/components/camel-ganglia/src/main/docs/ganglia-component.adoc b/components/camel-ganglia/src/main/docs/ganglia-component.adoc index 1f079bc..1032a59 100644 --- a/components/camel-ganglia/src/main/docs/ganglia-component.adoc +++ b/components/camel-ganglia/src/main/docs/ganglia-component.adoc @@ -25,26 +25,26 @@ for this component:   [source,xml] ------------------------------------------------------------- +---- org.apache.camel camel-ganglia x.x.x ------------------------------------------------------------- +---- -### URI format +=== URI format [source,java] ------------------------------- +---- ganglia:address:port[?options] ------------------------------- +---- You can append query options to the URI in the following format, `?option=value&option=value&...` -### Ganglia component and endpoint URI options +=== Ganglia component and endpoint URI options @@ -112,19 +112,19 @@ with the following path and query parameters: -### Message body +=== Message body Any value (such as a string or numeric type) in the body is sent to the Ganglia system. -### Return value / response +=== Return value / response Ganglia sends metrics using unidirectional UDP or multicast.  There is no response or change to the message body. -### Examples +=== Examples -### Sending a String metric +==== Sending a String metric The message body will be converted to a String and sent as a metric value.  Unlike numeric metrics, String values can't be charted but @@ -132,7 +132,7 @@ Ganglia makes them available for reporting.  The os_version string at the top of every Ganglia host page is an example of a String metric. [source,java] ------------------------------------------------------------------------- +---- from("direct:string.for.ganglia") .setHeader(GangliaConstants.METRIC_NAME, simple("my_string_metric")) .setHeader(GangliaConstants.METRIC_TYPE, GMetricType.STRING) @@ -140,12 +140,12 @@ from("direct:string.for.ganglia") from("direct:ganglia.tx") .to("ganglia:239.2.11.71:8649?mode=MULTICAST&prefix=test"); ------------------------------------------------------------------------- +---- -### Sending a numeric metric +==== Sending a numeric metric [source,java] ------------------------------------------------------------------------- +---- from("direct:value.for.ganglia") .setHeader(GangliaConstants.METRIC_NAME, simple("widgets_in_stock")) .setHeader(GangliaConstants.METRIC_TYPE, GMetricType.UINT32) @@ -154,4 +154,4 @@ from("direct:value.for.ganglia") from("direct:ganglia.tx") .to("ganglia:239.2.11.71:8649?mode=MULTICAST&prefix=test"); ------------------------------------------------------------------------- +---- diff --git a/components/camel-http/src/main/docs/http-component.adoc b/components/camel-http/src/main/docs/http-component.adoc index 0bae22f..a4436a9 100644 --- a/components/camel-http/src/main/docs/http-component.adoc +++ b/components/camel-http/src/main/docs/http-component.adoc @@ -11,21 +11,21 @@ Maven users will need to add the following dependency to their `pom.xml` for this component: [source,xml] ------------------------------------------------------------- +---- org.apache.camel camel-http x.x.x ------------------------------------------------------------- +---- -### URI format +=== URI format [source,java] ------------------------------------------------------------------- +---- http:hostname[:port][/resourceUri][?param1=value1][¶m2=value2] ------------------------------------------------------------------- +---- Will by default use port 80 for HTTP and 443 for HTTPS. @@ -38,7 +38,7 @@ route, you can use the <> or the <> -### Examples +=== Examples Call the url with the body using POST and return response as out message. If body is null call URL using GET and return response as out @@ -49,16 +49,16 @@ Java DSL Spring DSL [source,java] ------------------------------- +---- from("direct:start") .to("http://myhost/mypath"); ------------------------------- +---- [source,xml] --------------------------- +---- --------------------------- +---- You can override the HTTP endpoint URI by adding a header. Camel will call the http://newhost. This is very handy for e.g. REST urls. @@ -66,11 +66,11 @@ call the http://newhost. This is very handy for e.g. REST urls. Java DSL [source,java] ------------------------------------------------------------------------------------ +---- from("direct:start") .setHeader(Exchange.HTTP_URI, simple("http://myserver/orders/${header.orderId}")) .to("http://dummyhost"); ------------------------------------------------------------------------------------ +---- URI parameters can either be set directly on the endpoint URI or as a header @@ -78,13 +78,13 @@ header Java DSL [source,java] ---------------------------------------------------------------------- +---- from("direct:start") .to("http://oldhost?order=123&detail=short"); from("direct:start") .setHeader(Exchange.HTTP_QUERY, constant("order=123&detail=short")) .to("http://oldhost"); ---------------------------------------------------------------------- +---- Set the HTTP request method to POST @@ -93,23 +93,23 @@ Java DSL Spring DSL [source,java] ----------------------------------------------------- +---- from("direct:start") .setHeader(Exchange.HTTP_METHOD, constant("POST")) .to("http://www.google.com"); ----------------------------------------------------- +---- [source,xml] ----------------------------------------- +---- POST ----------------------------------------- +---- -### Http Options +=== Http Options @@ -212,7 +212,7 @@ with the following path and query parameters: -### Message Headers +=== Message Headers [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= @@ -257,14 +257,14 @@ default value "HTTP/1.1" The header name above are constants. For the spring DSL you have to use the value of the constant instead of the name. -### Message Body +=== Message Body Camel will store the HTTP response from the external server on the OUT body. All headers from the IN message will be copied to the OUT message, so headers are preserved during routing. Additionally Camel will add the HTTP response headers as well to the OUT message headers. -### Response code +=== Response code Camel will handle according to the HTTP response code: @@ -284,7 +284,7 @@ codes. This allows you to get any response from the remote server. + There is a sample below demonstrating this. -### HttpOperationFailedException +=== HttpOperationFailedException This exception contains the following information: @@ -294,7 +294,7 @@ This exception contains the following information: * Response body as a `java.lang.String`, if server provided a body as response -### Which HTTP method will be used +=== Which HTTP method will be used The following algorithm is used to determine what HTTP method should be used: + 1. Use method provided as endpoint configuration (`httpMethod`). + @@ -304,90 +304,90 @@ The following algorithm is used to determine what HTTP method should be used: + 5. `POST` if there is data to send (body is not `null`). + 6. `GET` otherwise. -### How to get access to HttpServletRequest and HttpServletResponse +=== How to get access to HttpServletRequest and HttpServletResponse You can get access to these two using the Camel type converter system using [source,java] ----------------------------------------------------------------------------------- +---- HttpServletRequest request = exchange.getIn().getBody(HttpServletRequest.class); HttpServletRequest response = exchange.getIn().getBody(HttpServletResponse.class); ----------------------------------------------------------------------------------- +---- -### Using client timeout - SO_TIMEOUT +=== Using client timeout - SO_TIMEOUT See the unit test in http://svn.apache.org/viewvc?view=rev&revision=781775[this link] -### More Examples +=== More Examples -### Configuring a Proxy +==== Configuring a Proxy Java DSL [source,java] ---------------------------------------------------------------- +---- from("direct:start") .to("http://oldhost?proxyHost=www.myproxy.com&proxyPort=80"); ---------------------------------------------------------------- +---- There is also support for proxy authentication via the `proxyUsername` and `proxyPassword` options. -#### Using proxy settings outside of URI +==== Using proxy settings outside of URI Java DSL Spring DSL [source,java] ---------------------------------------------------------------- +---- context.getProperties().put("http.proxyHost", "172.168.18.9"); context.getProperties().put("http.proxyPort" "8080"); ---------------------------------------------------------------- +---- -[source,java] ----------------------------------------------------------------- +[source,xml] +---- ----------------------------------------------------------------- +---- Options on Endpoint will override options on the context. -### Configuring charset +=== Configuring charset If you are using `POST` to send data you can configure the `charset` [source,java] -------------------------------------------------- +---- setProperty(Exchange.CHARSET_NAME, "iso-8859-1"); -------------------------------------------------- +---- -### Sample with scheduled poll +=== Sample with scheduled poll The sample polls the Google homepage every 10 seconds and write the page to the file `message.html`: [source,java] ----------------------------------------------------------------------------------------- +---- from("timer://foo?fixedRate=true&delay=0&period=10000") .to("http://www.google.com") .setHeader(FileComponent.HEADER_FILE_NAME, "message.html").to("file:target/google"); ----------------------------------------------------------------------------------------- +---- -### Getting the Response Code +=== Getting the Response Code You can get the HTTP response code from the HTTP component by getting the value from the Out message header with `Exchange.HTTP_RESPONSE_CODE`. [source,java] ----------------------------------------------------------------------------------------------- +---- Exchange exchange = template.send("http://www.google.com/search", new Processor() { public void process(Exchange exchange) throws Exception { exchange.getIn().setHeader(Exchange.HTTP_QUERY, constant("hl=en&q=activemq")); @@ -395,9 +395,9 @@ the value from the Out message header with }); Message out = exchange.getOut(); int responseCode = out.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class); ----------------------------------------------------------------------------------------------- +---- -### Using `throwExceptionOnFailure=false` to get any response back +=== Using `throwExceptionOnFailure=false` to get any response back In the route below we want to route a message that we enrich with data returned from a remote HTTP @@ -406,19 +406,19 @@ call. As we want any response from the remote server, we set the the `AggregationStrategy`. As the code is based on a unit test that simulates a HTTP status code 404, there is some assertion code etc. -### Disabling Cookies +=== Disabling Cookies To disable cookies you can set the HTTP Client to ignore cookies by adding this URI option: + `httpClient.cookiePolicy=ignoreCookies` -### Advanced Usage +=== Advanced Usage If you need more control over the HTTP producer you should use the `HttpComponent` where you can set various classes to give you custom behavior. -#### Setting MaxConnectionsPerHost +==== Setting MaxConnectionsPerHost The <> Component has a `org.apache.commons.httpclient.HttpConnectionManager` where you can @@ -437,7 +437,7 @@ connection to 5 instead of the default of 2. And then we can just use it as we normally do in our routes: -#### Using preemptive authentication +==== Using preemptive authentication An end user reported that he had problem with authenticating with HTTPS. The problem was eventually resolved when he discovered the HTTPS server @@ -445,14 +445,14 @@ did not return a HTTP code 401 Authorization Required. The solution was to set the following URI option: `httpClient.authenticationPreemptive=true` -#### Accepting self signed certificates from remote server +==== Accepting self signed certificates from remote server See this http://www.nabble.com/Using-HTTPS-in-camel-http-when-remote-side-has-self-signed-cert-td25916878.html[link] from a mailing list discussion with some code to outline how to do this with the Apache Commons HTTP API. -#### Setting up SSL for HTTP Client +==== Setting up SSL for HTTP Client [[HTTP-UsingtheJSSEConfigurationUtility]] Using the JSSE Configuration Utility @@ -474,7 +474,7 @@ demonstrates how to configure the protocol registry and use the registered protocol information in a route. [source,java] ----------------------------------------------------------------- +---- KeyStoreParameters ksp = new KeyStoreParameters(); ksp.setResource("/users/home/server/keystore.jks"); ksp.setPassword("keystorePassword"); @@ -497,7 +497,7 @@ Protocol.registerProtocol("https", from("direct:start") .to("https://mail.google.com/mail/").to("mock:results"); ----------------------------------------------------------------- +---- [[HTTP-ConfiguringApacheHTTPClientDirectly]] Configuring Apache HTTP Client Directly @@ -511,13 +511,13 @@ However if you _just_ want to specify the keystore and truststore you can do this with Apache HTTP `HttpClientConfigurer`, for example: [source,java] ----------------------------------------------------------------------------- +---- Protocol authhttps = new Protocol("https", new AuthSSLProtocolSocketFactory( new URL("file:my.keystore"), "mypassword", new URL("file:my.truststore"), "mypassword"), 443); Protocol.registerProtocol("https", authhttps); ----------------------------------------------------------------------------- +---- And then you need to create a class that implements `HttpClientConfigurer`, and registers https protocol providing a @@ -525,27 +525,27 @@ keystore or truststore per example above. Then, from your camel route builder class you can hook it up like so: [source,java] -------------------------------------------------------------------------------------- +---- HttpComponent httpComponent = getContext().getComponent("http", HttpComponent.class); httpComponent.setHttpClientConfigurer(new MyHttpClientConfigurer()); -------------------------------------------------------------------------------------- +---- If you are doing this using the Spring DSL, you can specify your `HttpClientConfigurer` using the URI. For example: [source,java] -------------------------------------------------------------------------------------------- +---- -------------------------------------------------------------------------------------------- +---- As long as you implement the HttpClientConfigurer and configure your keystore and truststore as described above, it will work fine. -### See Also +=== See Also * Configuring Camel * Component diff --git a/components/camel-ignite/src/main/docs/ignite.adoc b/components/camel-ignite/src/main/docs/ignite.adoc index f165706..a37cfe7 100644 --- a/components/camel-ignite/src/main/docs/ignite.adoc +++ b/components/camel-ignite/src/main/docs/ignite.adoc @@ -1,4 +1,4 @@ -## Ignite endpoints Component +== Ignite endpoints Component *Available as of Camel version 2.17* @@ -34,7 +34,7 @@ If running in an OSGi container, please don't miss the <> (such as <> or +<> (such as <> or <>) we could also test for the parameter value and do routing based on the header value as well. diff --git a/components/camel-jmx/src/main/docs/jmx-component.adoc b/components/camel-jmx/src/main/docs/jmx-component.adoc index 8b61a1a..3e03c70 100644 --- a/components/camel-jmx/src/main/docs/jmx-component.adoc +++ b/components/camel-jmx/src/main/docs/jmx-component.adoc @@ -10,7 +10,7 @@ ifdef::env-github[] :warning-caption: :warning: endif::[] -### Camel JMX +=== Camel JMX Apache Camel has extensive support for JMX to allow you to monitor and control the Camel managed objects with a JMX client. @@ -20,7 +20,7 @@ subscribe to MBean notifications. This page is about how to manage and monitor Camel using JMX. -### Options +=== Options // component options: START The JMX component has no options. @@ -83,7 +83,7 @@ with the following path and query parameters: |=== // endpoint options: END -### Activating JMX in Camel +=== Activating JMX in Camel [NOTE] ==== @@ -99,7 +99,7 @@ From *Camel 2.9* onwards, the Spring JARs are *no* longer required to run Camel in JMX mode. ==== -#### Using JMX to manage Apache Camel +==== Using JMX to manage Apache Camel By default, JMX instrumentation agent is enabled in Camel, which means that Camel runtime creates and registers MBean management objects with a @@ -142,7 +142,7 @@ Spring configuration: Spring configuration always takes precedence over system properties when they both present. It is true for all JMX related configurations. -#### Disabling JMX instrumentation agent in Camel +==== Disabling JMX instrumentation agent in Camel You can disable JMX instrumentation agent by setting the Java VM system property as follow: @@ -174,7 +174,7 @@ CamelContext camel = new DefaultCamelContext(); camel.disableJMX(); ---- -#### Locating a MBeanServer in the Java VM +==== Locating a MBeanServer in the Java VM Each CamelContext can have an instance of http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/InstrumentationAgent.html[`InstrumentationAgent`] @@ -242,7 +242,7 @@ Spring configuration: ---- -#### Creating JMX RMI Connector Server +==== Creating JMX RMI Connector Server JMX connector server enables MBeans to be remotely managed by a JMX client such as JConsole; Camel JMX RMI connector server can be @@ -265,7 +265,7 @@ Spring configuration: ---- -#### JMX Service URL +==== JMX Service URL The default JMX Service URL has the format: @@ -360,7 +360,7 @@ When the connector port option is set, the JMX service URL will become: service:jmx:rmi://localhost:/jndi/rmi://localhost:/ ---- -#### The System Properties for Camel JMX support +==== The System Properties for Camel JMX support [width="100%",cols="1m,1,3",options="header",] |======================================================================= @@ -372,7 +372,7 @@ feature in Camel See more system properties in this section below: _jmxAgent Properties Reference_. -#### How to use authentication with JMX +==== How to use authentication with JMX JMX in the JDK have features for authentication and also for using secure connections over SSL. You have to refer to the SUN documentation @@ -381,9 +381,9 @@ how to use this: * http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html * http://java.sun.com/javase/6/docs/technotes/guides/management/agent.html -#### JMX inside an Application Server +==== JMX inside an Application Server -#### Tomcat 6 +===== Tomcat 6 See http://tomcat.apache.org/tomcat-6.0-doc/monitoring.html[this page] for details about enabling JMX in Tomcat. @@ -399,7 +399,7 @@ set the following options... -Dcom.sun.management.jmxremote.authenticate=false ---- -#### JBoss AS 4 +===== JBoss AS 4 By default JBoss creates its own `MBeanServer`. To allow Camel to expose to the same server follow these steps: @@ -419,7 +419,7 @@ Add the following property to your `JAVA_OPTS` by editing `run.sh` or `run.conf` `-Djboss.platform.mbeanserver`. See http://wiki.jboss.org/wiki/JBossMBeansInJConsole -#### WebSphere +===== WebSphere Alter the `mbeanServerDefaultDomain` to be `WebSphere`: @@ -428,7 +428,7 @@ Alter the `mbeanServerDefaultDomain` to be `WebSphere`: ---- -#### Oracle OC4j +===== Oracle OC4j The Oracle OC4J J2EE application server will not allow Camel to access the platform `MBeanServer`. You can identify this in the log as Camel @@ -445,13 +445,13 @@ java.lang.SecurityException: Unauthorized access from application: xx to MBean: To resolve this you should disable the JMX agent in Camel, see section _Disabling JMX instrumentation agent in Camel_. -#### Advanced JMX Configuration +==== Advanced JMX Configuration The Spring configuration file allows you to configure how Camel is exposed to JMX for management. In some cases, you could specify more information here, like the connector's port or the path name. -#### Example: +==== Example: [source,xml] ---- @@ -484,7 +484,7 @@ SUNJMX=-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=1 for Camel, as additional startup parameters for the JVM. If you start Camel directly, you'll have to pass these parameters yourself.) -#### `jmxAgent` Properties Reference +==== `jmxAgent` Properties Reference [width="100%",cols="25%,25%,25%,25%",options="header",] |======================================================================= @@ -550,7 +550,7 @@ usage of each incoming and outgoing endpoints). |======================================================================= -#### Configuring whether to register MBeans always, for new routes or just by default +==== Configuring whether to register MBeans always, for new routes or just by default *Available as of Camel 2.7* @@ -581,9 +581,9 @@ also be registered. This could potential lead to system degration due the rising number of mbeans in the registry. A MBean is not a light-weight object and thus consumes memory. -### Monitoring Camel using JMX +=== Monitoring Camel using JMX -#### Using JConsole to monitor Camel +==== Using JConsole to monitor Camel The `CamelContext` should appear in the list of local connections, if you are running JConsole on the same host as Camel. @@ -596,7 +596,7 @@ Using the Apache Camel with JConsole: image:camel-jmx.png[image] -#### Which endpoints are registered +==== Which endpoints are registered In *Camel 2.1* onwards *only* `singleton` endpoints are registered as the overhead for non singleton will be substantial in cases where @@ -604,11 +604,11 @@ thousands or millions of endpoints are used. This can happens when using a Recipient List EIP or from a `ProducerTemplate` that sends a lot of messages. -#### Which processors are registered +==== Which processors are registered See this FAQ. -#### How to use the JMX NotificationListener to listen the camel events? +==== How to use the JMX NotificationListener to listen the camel events? The Camel notification events give a coarse grained overview what is happening. You can see lifecycle event from context and endpoints and @@ -651,7 +651,7 @@ context.getManagementStrategy().getManagementAgent().getMBeanServer().addNotific }, null); ---- -#### Using the Tracer MBean to get fine grained tracing +==== Using the Tracer MBean to get fine grained tracing Additionally to the coarse grained notifications above *Camel 2.9.0* support JMX Notification for fine grained trace events. @@ -672,9 +672,9 @@ route with all exchange and message details: image:jconsole_trace_notifications.png[image] -### Using JMX for your own Camel Code +=== Using JMX for your own Camel Code -#### Registering your own Managed Endpoints +==== Registering your own Managed Endpoints *Available as of Camel 2.0* + You can decorate your own endpoints with Spring managed annotations @@ -729,7 +729,7 @@ Notice from *Camel 2.9* onwards its encouraged to use the the `org.apache.camel.api.management` package. This allows your custom code to not depend on Spring JARs. -#### Programming your own Managed Services +==== Programming your own Managed Services *Available as of Camel 2.1* @@ -783,7 +783,7 @@ types such as: And in the future we will add additional wrappers for more EIP patterns. -#### ManagementNamingStrategy +==== ManagementNamingStrategy *Available as of Camel 2.1* @@ -792,7 +792,7 @@ Camel provides a pluggable API for naming strategy by implementation is used to compute the MBean names that all MBeans are registered with. -#### Management naming pattern +==== Management naming pattern *Available as of Camel 2.10* @@ -934,7 +934,7 @@ install a 2nd Camel application that has the same `CamelContext` id and `managementNamePattern` then Camel will fail upon starting, and report a MBean already exists exception. -#### ManagementStrategy +==== ManagementStrategy *Available as of Camel 2.1* @@ -947,7 +947,7 @@ does, for example, is make it easier to provide an adapter for other management products. In addition, it also allows you to provide more details and features that are provided out of the box at Apache. -#### Configuring level of granularity for performance statistics +==== Configuring level of granularity for performance statistics *Available as of Camel 2.1* @@ -1008,7 +1008,7 @@ And from Spring DSL you do: ---- -### Hiding sensitive information +=== Hiding sensitive information *Available as of Camel 2.12* @@ -1040,7 +1040,7 @@ And from Spring DSL you do: This will mask URIs having options such as password and passphrase, and use `xxxxxx` as the replacement value. -#### Declaring which JMX attributes and operations to mask +==== Declaring which JMX attributes and operations to mask On the `org.apache.camel.api.management.ManagedAttribute` and `org.apache.camel.api.management.ManagedOperation`, the attribute `mask` @@ -1058,7 +1058,7 @@ declared that the `EndpointUri` JMX attribute is masked: String getEndpointUri(); ---- -### See Also +=== See Also * Management Example * link:why-is-my-processor-not-showing-up-in-jconsole.html[Why is my diff --git a/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc b/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc index 55285ca..72c8c09 100644 --- a/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc +++ b/components/camel-kubernetes/src/main/docs/kubernetes-component.adoc @@ -9,7 +9,7 @@ The composite kubernetes component has been deprecated. Use individual component splitted as following. * <> - ** <> + ** <> ** Kubernetes Build ** <> ** <> @@ -40,7 +40,7 @@ their `pom.xml` for this component: ------------------------------------------------------------ -### URI format +=== URI format [source,java] ------------------------------ @@ -50,7 +50,7 @@ kubernetes:masterUrl[?options] You can append query options to the URI in the following format, `?option=value&option=value&...` -### Options +=== Options // component options: START @@ -126,7 +126,7 @@ with the following path and query parameters: -### Headers +=== Headers [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= @@ -210,7 +210,7 @@ with the following path and query parameters: |======================================================================= -### Categories +=== Categories Actually the camel-kubernetes component supports the following Kubernetes resources @@ -231,13 +231,13 @@ In Openshift also - Builds - BuildConfigs -### Usage +=== Usage -#### Producer examples +==== Producer examples Here we show some examples of producer using camel-kubernetes. -#### Create a pod +==== Create a pod [source,java] ------------------------------------------------------------- @@ -247,7 +247,7 @@ from("direct:createPod") By using the KubernetesConstants.KUBERNETES_POD_SPEC header you can specify your PodSpec and pass it to this operation. -#### Delete a pod +==== Delete a pod [source,java] ------------------------------------------------------------- diff --git a/components/camel-kubernetes/src/main/docs/kubernetes.adoc b/components/camel-kubernetes/src/main/docs/kubernetes.adoc index d21ef2f..0b1eb65 100644 --- a/components/camel-kubernetes/src/main/docs/kubernetes.adoc +++ b/components/camel-kubernetes/src/main/docs/kubernetes.adoc @@ -20,7 +20,7 @@ The camel-kubernetes consists of 13 components: In OpenShift, also: -* <> +* <> * Kubernetes Build @@ -146,4 +146,4 @@ from("direct:createPod") .toF("kubernetes-pods://%s?oauthToken=%s&operation=deletePod", host, authToken); ------------------------------------------------------------- -By using the KubernetesConstants.KUBERNETES_POD_NAME header you can specify your Pod name and pass it to this operation. \ No newline at end of file +By using the KubernetesConstants.KUBERNETES_POD_NAME header you can specify your Pod name and pass it to this operation. diff --git a/components/camel-mina2/src/main/docs/mina2-component.adoc b/components/camel-mina2/src/main/docs/mina2-component.adoc index b95ceb5..fad2535 100644 --- a/components/camel-mina2/src/main/docs/mina2-component.adoc +++ b/components/camel-mina2/src/main/docs/mina2-component.adoc @@ -206,7 +206,7 @@ assertEquals("Bye World", response); ### Sample with Spring DSL -Spring DSL can, of course, also be used for <>. In the +Spring DSL can, of course, also be used for <>. In the sample below we expose a TCP server on port 5555: [source,xml] @@ -272,6 +272,4 @@ is, after `codec` and `logger`. * Component * Endpoint * Getting Started - -* <> * <> diff --git a/components/camel-mllp/src/main/docs/mllp-component.adoc b/components/camel-mllp/src/main/docs/mllp-component.adoc index 5664b4a..47255ae 100644 --- a/components/camel-mllp/src/main/docs/mllp-component.adoc +++ b/components/camel-mllp/src/main/docs/mllp-component.adoc @@ -36,7 +36,7 @@ for this component: --------------------------------------------------------- -### MLLP Options +=== MLLP Options @@ -125,7 +125,7 @@ with the following path and query parameters: -### MLLP Consumer +=== MLLP Consumer The MLLP Consumer supports receiving MLLP-framed messages and sending HL7 Acknowledgements.  The MLLP Consumer can automatically generate the @@ -135,7 +135,7 @@ the CamelMllpAcknowledgement exchange property.  Additionally, the type of acknowledgement that will be generated can be controlled by setting the CamelMllpAcknowledgementType exchange property. -### *Message Headers* +=== *Message Headers* The MLLP Consumer adds these headers on the Camel message: @@ -162,7 +162,7 @@ The MLLP Consumer adds these headers on the Camel message: All headers are String types. If a header value is missing, its value is null. -### *Exchange Properties* +=== *Exchange Properties* The type of acknowledgment the MLLP Consumer generates and state of the TCP Socket can be controlled by these properties on the Camel exchange: @@ -181,9 +181,10 @@ by these properties on the Camel exchange: |CamelMllpResetConnectionAfterSend | Boolean | If true, the Socket will be reset immediately after sending any data |==================================== -### Consumer Configuration +// REVISIT - Empty section is bad for AsciiDoc build +//=== Consumer Configuration -### MLLP Producer +=== MLLP Producer The MLLP Producer supports sending MLLP-framed messages and receiving HL7 Acknowledgements.  The MLLP Producer interrogates the HL7 @@ -191,7 +192,7 @@ Acknowledgments and raises exceptions if a negative acknowledgement is received.  The received acknowledgement is interrogated and an exception is raised in the event of a negative acknowledgement. -### *Message Headers* +=== *Message Headers* The MLLP Producer adds these headers on the Camel message: @@ -205,7 +206,7 @@ The MLLP Producer adds these headers on the Camel message: |CamelMllpAcknowledgementType | The HL7 acknowledgement type (AA, AE, AR, etc) |=================================== -### *Exchange Properties* +=== *Exchange Properties* The state of the TCP Socket can be controlled by these properties on the Camel exchange: diff --git a/components/camel-mongodb/src/main/docs/mongodb-component.adoc b/components/camel-mongodb/src/main/docs/mongodb-component.adoc index 0f114ae..dbbff25 100644 --- a/components/camel-mongodb/src/main/docs/mongodb-component.adoc +++ b/components/camel-mongodb/src/main/docs/mongodb-component.adoc @@ -41,14 +41,14 @@ for this component: ------------------------------------------------------------ -### URI format +=== URI format [source,java] --------------------------------------------------------------------------------------------------------------- mongodb:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] --------------------------------------------------------------------------------------------------------------- -### MongoDB options +=== MongoDB options // component options: START @@ -116,7 +116,7 @@ with the following path and query parameters: -### Configuration of database in Spring XML +=== Configuration of database in Spring XML The following Spring XML creates a bean defining the connection to a MongoDB instance. @@ -134,7 +134,7 @@ MongoDB instance. ---------------------------------------------------------------------------------------------------------------------------------- -### Sample route +=== Sample route The following route defined in Spring XML executes the operation <> on a collection. @@ -151,11 +151,11 @@ The following route defined in Spring XML executes the operation --------------------------------------------------------------------------------------------------------------------------- -### MongoDB operations - producer endpoints +=== MongoDB operations - producer endpoints -### Query operations +==== Query operations -#### findById +===== findById This operation retrieves only one element from the collection whose _id field matches the content of the IN message body. The incoming object @@ -175,7 +175,7 @@ from("direct:findById") TIP: *Supports optional parameters*. This operation supports specifying a fields filter. See <>. -#### findOneByQuery +===== findOneByQuery Use this operation to retrieve just one element from the collection that matches a MongoDB query. *The query object is extracted from the IN @@ -205,7 +205,7 @@ from("direct:findOneByQuery") TIP: *Supports optional parameters*. This operation supports specifying a fields filter and/or a sort clause. See <>. -#### findAll +===== findAll The `findAll` operation returns all documents matching a query, or none at all, in which case all documents contained in the collection are @@ -292,7 +292,7 @@ consideration. |int/Integer TIP: *Supports optional parameters*. This operation supports specifying a fields filter and/or a sort clause. See <>. -#### count +===== count Returns the total number of objects in a collection, returning a Long as the OUT message body. + @@ -321,7 +321,7 @@ DBObject query = ... Long count = template.requestBodyAndHeader("direct:count", query, MongoDbConstants.COLLECTION, "dynamicCollectionName"); ------------------------------------------------------------------------------------------------------------------------ -#### Specifying a fields filter (projection) +===== Specifying a fields filter (projection) Query operations will, by default, return the matching objects in their entirety (with all their fields). If your documents are large and you @@ -342,7 +342,7 @@ DBObject fieldFilter = BasicDBObjectBuilder.start().add("_id", 0).add("boringFie Object result = template.requestBodyAndHeader("direct:findAll", (Object) null, MongoDbConstants.FIELDS_FILTER, fieldFilter); ---------------------------------------------------------------------------------------------------------------------------- -#### Specifying a sort clause +===== Specifying a sort clause There is a often a requirement to fetch the min/max record from a collection based on sorting by a particular field. In Mongo the @@ -375,9 +375,9 @@ to a single field, based on the `documentTimestamp` field: ---------------------------------------------------------------------------------------------------------------------------- -### Create/update operations +==== Create/update operations -#### insert +===== insert Inserts an new object into the MongoDB collection, taken from the IN message body. Type conversion is attempted to turn it into `DBObject` or @@ -424,7 +424,7 @@ constant). The value stored is `org.bson.types.ObjectId` for single insert or `java.util.List` if multiple records have been inserted. -#### save +===== save The save operation is equivalent to an _upsert_ (UPdate, inSERT) operation, where the record will be updated, and if it doesn't exist, it @@ -454,7 +454,7 @@ from("direct:insert") .to("mongodb:myDb?database=flights&collection=tickets&operation=save"); --------------------------------------------------------------------------- -#### update +===== update Update one or multiple records on the collection. Requires a List as the IN message body containing exactly 2 elements: @@ -498,9 +498,9 @@ DBObject updateObj = new BasicDBObject("$set", new BasicDBObject("scientist", "D Object result = template.requestBodyAndHeader("direct:update", new Object[] {filterField, updateObj}, MongoDbConstants.MULTIUPDATE, true); ------------------------------------------------------------------------------------------------------------------------------------------ -### Delete operations +==== Delete operations -#### remove +===== remove Remove matching records from the collection. The IN message body will act as the removal filter query, and is expected to be of type @@ -521,9 +521,9 @@ A header with key `CamelMongoDbRecordsAffected` is returned containing the number of records deleted (copied from `WriteResult.getN()`). -### Other operations +==== Other operations -#### aggregate +===== aggregate *Available as of Camel 2.14* @@ -569,7 +569,7 @@ from("direct:aggregate") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- -#### getDbStats +===== getDbStats Equivalent of running the `db.stats()` command in the MongoDB shell, which displays useful statistic figures about the database. + @@ -606,7 +606,7 @@ assertTrue("Result is not of type DBObject", result instanceof DBObject); The operation will return a data structure similar to the one displayed in the shell, in the form of a `DBObject` in the OUT message body. -#### getColStats +===== getColStats Equivalent of running the `db.collection.stats()` command in the MongoDB shell, which displays useful statistic figures about the collection. + @@ -646,7 +646,7 @@ assertTrue("Result is not of type DBObject", result instanceof DBObject); The operation will return a data structure similar to the one displayed in the shell, in the form of a `DBObject` in the OUT message body. -#### command +===== command *Available as of Camel 2.15* @@ -662,7 +662,7 @@ DBObject commandBody = new BasicDBObject("hostInfo", "1"); Object result = template.requestBody("direct:command", commandBody); -------------------------------------------------------------------------------- -### Dynamic operations +==== Dynamic operations An Exchange can override the endpoint's fixed operation by setting the `CamelMongoDbOperation` header, defined by the @@ -680,7 +680,7 @@ Object result = template.requestBodyAndHeader("direct:insert", "irrelevantBody", assertTrue("Result is not of type Long", result instanceof Long); ----------------------------------------------------------------------------------------------------------------------------- -### Tailable Cursor Consumer +=== Tailable Cursor Consumer MongoDB offers a mechanism to instantaneously consume ongoing data from a collection, by keeping the cursor open just like the `tail -f` command @@ -702,7 +702,7 @@ new objects are inserted, MongoDB will push them as DBObjects in natural order to your tailable cursor consumer, who will transform them to an Exchange and will trigger your route logic. -### How the tailable cursor consumer works +=== How the tailable cursor consumer works To turn a cursor into a tailable cursor, a few special flags are to be signalled to MongoDB when first generating the cursor. Once created, the @@ -753,7 +753,7 @@ The above route will consume from the "flights.cancellations" capped collection, using "departureTime" as the increasing field, with a default regeneration cursor delay of 1000ms. -### Persistent tail tracking +=== Persistent tail tracking Standard tail tracking is volatile and the last value is only kept in memory. However, in practice you will need to restart your Camel @@ -773,7 +773,7 @@ persisting at regular intervals too in the future (flush every 5 seconds) for added robustness if the demand is there. To request this feature, please open a ticket in the Camel JIRA. -### Enabling persistent tail tracking +=== Enabling persistent tail tracking To enable this function, set at least the following options on the endpoint URI: @@ -819,7 +819,7 @@ from("mongodb:myDb?database=flights&collection=cancellations&tailTrackIncreasing .to("mock:test"); ----------------------------------------------------------------------------------------------------------------------------------- -### Oplog Tail Tracking +=== Oplog Tail Tracking The *oplog* collection tracking feature allows to implement trigger like functionality in MongoDB. In order to activate this collection you will have first to activate a replica set. For more @@ -933,7 +933,7 @@ public class MongoDbTracker { ----------------------------------------------------------------------------------------------------------------------------------- -### Type conversions +=== Type conversions The `MongoDbBasicConverters` type converter included with the camel-mongodb component provides the following conversions: @@ -957,7 +957,7 @@ object to a `Map`, which is in turn used to initialise a new This type converter is auto-discovered, so you don't need to configure anything manually. -### See also +=== See also * http://www.mongodb.org/[MongoDB website] * http://en.wikipedia.org/wiki/NoSQL[NoSQL Wikipedia article] diff --git a/components/camel-mongodb3/src/main/docs/mongodb3-component.adoc b/components/camel-mongodb3/src/main/docs/mongodb3-component.adoc index ea8c775..aef5bf0 100644 --- a/components/camel-mongodb3/src/main/docs/mongodb3-component.adoc +++ b/components/camel-mongodb3/src/main/docs/mongodb3-component.adoc @@ -43,14 +43,14 @@ for this component: ------------------------------------------------------------ -### URI format +=== URI format [source,java] --------------------------------------------------------------------------------------------------------------- mongodb3:connectionBean?database=databaseName&collection=collectionName&operation=operationName[&moreOptions...] --------------------------------------------------------------------------------------------------------------- -### MongoDB options +=== MongoDB options // component options: START @@ -118,8 +118,8 @@ readPreference *Remove in camel 2.19.* See Mongo client options <>. -#### findOneByQuery +===== findOneByQuery Use this operation to retrieve just one element (the first) from the collection that matches a MongoDB query. *The query object is extracted `CamelMongoDbCriteria` header*. @@ -217,7 +217,7 @@ from("direct:findOneByQuery") TIP: *Supports optional parameters*. This operation supports specifying a fields projection and/or a sort clause. See <>. -#### findAll +===== findAll The `findAll` operation returns all documents matching a query, or none at all, in which case all documents contained in the collection are @@ -300,7 +300,7 @@ consideration. |int/Integer TIP: *Supports optional parameters*. This operation supports specifying a fields projection and/or a sort clause. See <>. -#### count +===== count Returns the total number of objects in a collection, returning a Long as the OUT message body. + @@ -330,7 +330,7 @@ Document query = ... Long count = template.requestBodyAndHeader("direct:count", query, MongoDbConstants.COLLECTION, "dynamicCollectionName"); ------------------------------------------------------------------------------------------------------------------------ -#### Specifying a fields filter (projection) +===== Specifying a fields filter (projection) Query operations will, by default, return the matching objects in their entirety (with all their fields). If your documents are large and you @@ -362,7 +362,7 @@ Bson fieldProjection = Projection.exclude("_id", "boringField"); Object result = template.requestBodyAndHeader("direct:findAll", ObjectUtils.NULL, MongoDbConstants.FIELDS_PROJECTION, fieldProjection); ---------------------------------------------------------------------------------------------------------------------------- -#### Specifying a sort clause +===== Specifying a sort clause There is a often a requirement to fetch the min/max record from a collection based on sorting by a particular field @@ -396,9 +396,9 @@ to a single field, based on the `documentTimestamp` field: ; ---------------------------------------------------------------------------------------------------------------------------- -### Create/update operations +==== Create/update operations -#### insert +===== insert Inserts an new object into the MongoDB collection, taken from the IN message body. Type conversion is attempted to turn it into `Document` or @@ -445,7 +445,7 @@ have been inserted. In MongoDB Java Driver 3.x the insertOne and insertMany operation return void. The Camel insert operation return the Document or List of Documents inserted. Note that each Documents are Updated by a new OID if need. -#### save +===== save The save operation is equivalent to an _upsert_ (UPdate, inSERT) operation, where the record will be updated, and if it doesn't exist, it @@ -477,7 +477,7 @@ from("direct:insert") .to("mongodb3:myDb?database=flights&collection=tickets&operation=save"); --------------------------------------------------------------------------- -#### update +===== update Update one or multiple records on the collection. Requires a filter query and a update rules. @@ -546,9 +546,9 @@ Object result = template.requestBodyAndHeader("direct:update", updateObj, MongoD ------------------------------------------------------------------------------------------------------------------------------------------ -### Delete operations +==== Delete operations -#### remove +===== remove Remove matching records from the collection. The IN message body will act as the removal filter query, and is expected to be of type @@ -569,9 +569,9 @@ A header with key `CamelMongoDbRecordsAffected` is returned containing the number of records deleted (copied from `WriteResult.getN()`). -### Other operations +==== Other operations -#### aggregate +===== aggregate Perform a aggregation with the given pipeline contained in the body. *Aggregations could be long and heavy operations. Use with care.* @@ -620,7 +620,7 @@ from("direct:aggregate") ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- -#### getDbStats +===== getDbStats Equivalent of running the `db.stats()` command in the MongoDB shell, which displays useful statistic figures about the database. + @@ -657,7 +657,7 @@ assertTrue("Result is not of type Document", result instanceof Document); The operation will return a data structure similar to the one displayed in the shell, in the form of a `Document` in the OUT message body. -#### getColStats +===== getColStats Equivalent of running the `db.collection.stats()` command in the MongoDB shell, which displays useful statistic figures about the collection. + @@ -697,7 +697,7 @@ assertTrue("Result is not of type Document", result instanceof Document); The operation will return a data structure similar to the one displayed in the shell, in the form of a `Document` in the OUT message body. -#### command +===== command Run the body as a command on database. Usefull for admin operation as getting host informations, replication or sharding status. @@ -711,7 +711,7 @@ DBObject commandBody = new BasicDBObject("hostInfo", "1"); Object result = template.requestBody("direct:command", commandBody); -------------------------------------------------------------------------------- -### Dynamic operations +==== Dynamic operations An Exchange can override the endpoint's fixed operation by setting the `CamelMongoDbOperation` header, defined by the @@ -729,7 +729,7 @@ Object result = template.requestBodyAndHeader("direct:insert", "irrelevantBody", assertTrue("Result is not of type Long", result instanceof Long); ----------------------------------------------------------------------------------------------------------------------------- -### Tailable Cursor Consumer +=== Tailable Cursor Consumer MongoDB offers a mechanism to instantaneously consume ongoing data from a collection, by keeping the cursor open just like the `tail -f` command @@ -751,7 +751,7 @@ new objects are inserted, MongoDB will push them as `Document` in natural order to your tailable cursor consumer, who will transform them to an Exchange and will trigger your route logic. -### How the tailable cursor consumer works +=== How the tailable cursor consumer works To turn a cursor into a tailable cursor, a few special flags are to be signalled to MongoDB when first generating the cursor. Once created, the @@ -802,7 +802,7 @@ The above route will consume from the "flights.cancellations" capped collection, using "departureTime" as the increasing field, with a default regeneration cursor delay of 1000ms. -### Persistent tail tracking +=== Persistent tail tracking Standard tail tracking is volatile and the last value is only kept in memory. However, in practice you will need to restart your Camel @@ -822,7 +822,7 @@ persisting at regular intervals too in the future (flush every 5 seconds) for added robustness if the demand is there. To request this feature, please open a ticket in the Camel JIRA. -### Enabling persistent tail tracking +=== Enabling persistent tail tracking To enable this function, set at least the following options on the endpoint URI: @@ -868,7 +868,7 @@ from("mongodb3:myDb?database=flights&collection=cancellations&tailTrackIncreasin .to("mock:test"); ----------------------------------------------------------------------------------------------------------------------------------- -### Type conversions +=== Type conversions The `MongoDbBasicConverters` type converter included with the camel-mongodb component provides the following conversions: @@ -889,7 +889,7 @@ object to a `Map`, which is in turn used to initialise a new This type converter is auto-discovered, so you don't need to configure anything manually. -### See also +=== See also * http://www.mongodb.org/[MongoDB website] * http://en.wikipedia.org/wiki/NoSQL[NoSQL Wikipedia article] diff --git a/components/camel-netty/src/main/docs/netty-component.adoc b/components/camel-netty/src/main/docs/netty-component.adoc index 00189a9..5c78120 100644 --- a/components/camel-netty/src/main/docs/netty-component.adoc +++ b/components/camel-netty/src/main/docs/netty-component.adoc @@ -628,6 +628,5 @@ And if we have another route we can refer to the shared worker pool: * Component * Endpoint * Getting Started - * <> -* <> +* <> diff --git a/components/camel-netty4/src/main/docs/netty4-component.adoc b/components/camel-netty4/src/main/docs/netty4-component.adoc index 9b3f62a..d1c909b 100644 --- a/components/camel-netty4/src/main/docs/netty4-component.adoc +++ b/components/camel-netty4/src/main/docs/netty4-component.adoc @@ -696,6 +696,5 @@ And if we have another route we can refer to the shared worker pool: * Component * Endpoint * Getting Started - * <> -* <> +* <> diff --git a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc index c0a914e..7a5c775 100644 --- a/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc +++ b/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc @@ -253,5 +253,3 @@ The following route creates People entity using the from("direct:...") .to("olingo4://create/People"); ------------------------------------------------------------ - ---------------------------------------------------------------------------------------------------------- diff --git a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc index e1d469a..5926d6f 100644 --- a/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc +++ b/components/camel-salesforce/camel-salesforce-component/src/main/docs/salesforce-component.adoc @@ -12,20 +12,20 @@ Maven users will need to add the following dependency to their `pom.xml` for this component: [source,xml] ------------------------------------------------------------- +---- org.apache.camel camel-salesforce x.x.x ------------------------------------------------------------- +---- NOTE: Developers wishing to contribute to the component are instructed to look at the README.md file on instructions on how to get started and setup your environment for running integration tests. -## Authenticating to Salesforce +=== Authenticating to Salesforce The component supports three OAuth authentication flows: @@ -56,27 +56,27 @@ NOTE: The certificate used in JWT Bearer Token Flow can be a selfsigned certificate. The KeyStore holding the certificate and the private key must contain only single certificate-private key entry. -### URI format +=== URI format When used as a consumer, receiving streaming events, the URI scheme is: [source,java] ------------------------- +---- salesforce:topic?options ------------------------- +---- When used as a producer, invoking the Salesforce RSET APIs, the URI scheme is: [source,java] ------------------------- +---- salesforce:operationName?options ------------------------- +---- You can append query options to the URI in the following format, `?option=value&option=value&...` -### Passing in Salesforce headers and fetching Salesforce response headers +=== Passing in Salesforce headers and fetching Salesforce response headers With Camel 2.21 there is support to pass https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/headers.htm[Salesforce headers] via inbound message headers, header names that start with `Sforce` or @@ -87,7 +87,7 @@ message headers. For example to fetch API limits you can specify: [source,java] ------------------------- +---- // in your Camel route set the header before Salesforce endpoint //... .setHeader("Sforce-Limit-Info", constant("api-usage")) @@ -102,16 +102,16 @@ class MyProcessor implements Processor { String apiLimits = in.getHeader("Sforce-Limit-Info", String.class); } } ------------------------- +---- -### Supported Salesforce APIs +=== Supported Salesforce APIs The component supports the following Salesforce APIs Producer endpoints can use the following APIs. Most of the APIs process one record at a time, the Query API can retrieve multiple Records. -#### Rest API +==== Rest API You can use the following for `operationName`: @@ -151,11 +151,11 @@ updated, or `CreateSObjectResult` with an id of the new record, or a list of errors while creating the new object. [source,java] ------------------------------------------------------------ +---- ...to("salesforce:upsertSObject?sObjectIdName=Name")... ------------------------------------------------------------ +---- -#### Rest Bulk API +==== Rest Bulk API Producer endpoints can use the following APIs. All Job data formats, i.e. xml, csv, zip/xml, and zip/csv are supported. + @@ -189,11 +189,11 @@ will contain `BatchInfo` on success, or throw a `SalesforceException` on error. [source,java] ----------------------------------------- +---- ...to("salesforce:createBatchJob").. ----------------------------------------- +---- -#### Rest Streaming API +==== Rest Streaming API Consumer endpoints can use the following sytax for streaming endpoints to receive Salesforce notifications on create/update. @@ -201,25 +201,25 @@ to receive Salesforce notifications on create/update. To create and subscribe to a topic [source,java] ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- from("salesforce:CamelTestTopic?notifyForFields=ALL¬ifyForOperations=ALL&sObjectName=Merchandise__c&updateTopic=true&sObjectQuery=SELECT Id, Name FROM Merchandise__c")... ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +---- To subscribe to an existing topic [source,java] -------------------------------------------------------------------- +---- from("salesforce:CamelTestTopic&sObjectName=Merchandise__c")... -------------------------------------------------------------------- +---- -### Examples +=== Examples -### Uploading a document to a ContentWorkspace +==== Uploading a document to a ContentWorkspace Create the ContentVersion in Java, using a Processor instance: [source,java] ------------------------------------------------------------------------------------ +---- public class ContentProcessor implements Processor { public void process(Exchange exchange) throws Exception { Message message = exchange.getIn(); @@ -242,19 +242,19 @@ public class ContentProcessor implements Processor { .... } } ------------------------------------------------------------------------------------ +---- Give the output from the processor to the Salesforce component: [source,java] ------------------------------------------------------------------------------------------------------ +---- from("file:///home/camel/library") .to(new ContentProcessor()) // convert bytes from the file into a ContentVersion SObject // for the salesforce component .to("salesforce:createSObject"); ------------------------------------------------------------------------------------------------------ +---- -### Using Salesforce Limits API +=== Using Salesforce Limits API With `salesforce:limits` operation you can fetch of API limits from Salesforce and then act upon that data received. The result of `salesforce:limits` operation is mapped to `org.apache.camel.component.salesforce.api.dto.Limits` @@ -271,7 +271,7 @@ evaluate as with floating point arithmetic, without it - it would end up making with either `0` (some API limits consumed) or `1` (no API limits consumed). [source,java] ------------------------------------------------------------------------------------------------------ +---- from("direct:querySalesforce") .to("salesforce:limits") .choice() @@ -280,9 +280,9 @@ from("direct:querySalesforce") .otherwise() .setBody(constant("Used up Salesforce API limits, leaving 10% for critical routes")) .endChoice() ------------------------------------------------------------------------------------------------------ +---- -### Working with approvals +=== Working with approvals All the properties are named exactly the same as in the Salesforce REST API prefixed with `approval.`. You can set approval properties by setting `approval.PropertyName` of the Endpoint these will be used as template -- meaning @@ -305,7 +305,7 @@ For example to send one record for approval using values in headers use: Given a route: [source,java] ------------------------------------------------------------------------------------------------------ +---- from("direct:example1")// .setHeader("approval.ContextId", simple("${body['contextId']}")) .setHeader("approval.NextApproverIds", simple("${body['nextApproverIds']}")) @@ -314,20 +314,20 @@ from("direct:example1")// + "&approval.comments=this is a test"// + "&approval.processDefinitionNameOrId=Test_Account_Process"// + "&approval.skipEntryCriteria=true"); ------------------------------------------------------------------------------------------------------ +---- You could send a record for approval using: [source,java] ------------------------------------------------------------------------------------------------------ +---- final Map body = new HashMap<>(); body.put("contextId", accountIds.iterator().next()); body.put("nextApproverIds", userId); final ApprovalResult result = template.requestBody("direct:example1", body, ApprovalResult.class); ------------------------------------------------------------------------------------------------------ +---- -### Using Salesforce Recent Items API +=== Using Salesforce Recent Items API To fetch the recent items use `salesforce:recent` operation. This operation returns an `java.util.List` of `org.apache.camel.component.salesforce.api.dto.RecentItem` objects (`List`) that in turn contain @@ -335,14 +335,14 @@ the `Id`, `Name` and `Attributes` (with `type` and `url` properties). You can li by specifying `limit` parameter set to maximum number of records to return. For example: [source,java] ------------------------------------------------------------------------------------------------------ +---- from("direct:fetchRecentItems") to("salesforce:recent") .split().body() .log("${body.name} at ${body.attributes.url}"); ------------------------------------------------------------------------------------------------------ +---- -### Working with approvals +=== Working with approvals All the properties are named exactly the same as in the Salesforce REST API prefixed with `approval.`. You can set approval properties by setting `approval.PropertyName` of the Endpoint these will be used as template -- meaning @@ -365,7 +365,7 @@ For example to send one record for approval using values in headers use: Given a route: [source,java] ------------------------------------------------------------------------------------------------------ +---- from("direct:example1")// .setHeader("approval.ContextId", simple("${body['contextId']}")) .setHeader("approval.NextApproverIds", simple("${body['nextApproverIds']}")) @@ -374,20 +374,20 @@ from("direct:example1")// + "&approvalComments=this is a test"// + "&approvalProcessDefinitionNameOrId=Test_Account_Process"// + "&approvalSkipEntryCriteria=true"); ------------------------------------------------------------------------------------------------------ +---- You could send a record for approval using: [source,java] ------------------------------------------------------------------------------------------------------ +---- final Map body = new HashMap<>(); body.put("contextId", accountIds.iterator().next()); body.put("nextApproverIds", userId); final ApprovalResult result = template.requestBody("direct:example1", body, ApprovalResult.class); ------------------------------------------------------------------------------------------------------ +---- -### Using Salesforce Composite API to submit SObject tree +=== Using Salesforce Composite API to submit SObject tree To create up to 200 records including parent-child relationships use `salesforce:composite-tree` operation. This requires an instance of `org.apache.camel.component.salesforce.api.dto.composite.SObjectTree` in the input @@ -405,7 +405,7 @@ from your database. Lets look at an example: [source,java] ------------------------------------------------------------------------------------------------------ +---- Account account = ... Contact president = ... Contact marketing = ... @@ -427,9 +427,9 @@ final List withErrors = result.get(true); final List succeeded = result.get(false); final String firstId = succeeded.get(0).getId(); ------------------------------------------------------------------------------------------------------ +---- -### Using Salesforce Composite API to submit multiple requests in a batch +=== Using Salesforce Composite API to submit multiple requests in a batch The Composite API batch operation (`composite-batch`) allows you to accumulate multiple requests in a batch and then submit them in one go, saving the round trip cost of multiple individual requests. Each response is then received in a list of responses with the order preserved, so that the n-th requests response is in the n-th place of the response. @@ -444,7 +444,7 @@ handling code. Lets look at an example: [source,java] ------------------------------------------------------------------------------------------------------ +---- final String acountId = ... final SObjectBatch batch = new SObjectBatch("38.0"); @@ -483,10 +483,9 @@ final String accountBillingPostalCode = retrieveData.get("BillingPostalCode"); / final SObjectBatchResult deleteResult = results.get(3); // delete result final int updateStatus = deleteResult.getStatusCode(); // probably 204 final Object updateResultData = deleteResult.getResult(); // probably null +---- ------------------------------------------------------------------------------------------------------ - -### Using Salesforce Composite API to submit multiple chained requests +=== Using Salesforce Composite API to submit multiple chained requests The `composite` operation allows submitting up to 25 requests that can be chained together, for instance identifier generated in previous request can be used in subsequent request. Individual requests and responses are linked with the provided _reference_. @@ -501,7 +500,7 @@ strings and what values are numbers), so in general those will be more type frie Lets look at an example: [source,java] ------------------------------------------------------------------------------------------------------ +---- SObjectComposite composite = new SObjectComposite("38.0", true); // first insert operation via an external id @@ -531,17 +530,15 @@ final int statusCode = accountUpdateResult.getHttpStatusCode(); // should be 200 final Map accountUpdateBody = accountUpdateResult.getBody(); final SObjectCompositeResult contactCreationResult = results.stream().filter(r -> "JunctionRecord".equals(r.getReferenceId())).findFirst().get() -// ... - ------------------------------------------------------------------------------------------------------ +---- -### Camel Salesforce Maven Plugin +=== Camel Salesforce Maven Plugin This Maven plugin generates DTOs for the Camel <>. -### Options +=== Options @@ -680,16 +677,16 @@ The plugin should be configured for the rest of the properties, and can be executed using the following command: [source,java] ---------------------------------------------------------------------------------------------------------------------------------- +---- mvn camel-salesforce:generate -DcamelSalesforce.clientId= -DcamelSalesforce.clientSecret= \ -DcamelSalesforce.userName= -DcamelSalesforce.password= ---------------------------------------------------------------------------------------------------------------------------------- +---- The generated DTOs use Jackson and XStream annotations. All Salesforce field types are supported. Date and time fields are mapped to Joda DateTime, and picklist fields are mapped to generated Java Enumerations. -### See Also +=== See Also * Configuring Camel * Component diff --git a/components/camel-sql/src/main/docs/sql-component.adoc b/components/camel-sql/src/main/docs/sql-component.adoc index 61bc566..acc55c2 100644 --- a/components/camel-sql/src/main/docs/sql-component.adoc +++ b/components/camel-sql/src/main/docs/sql-component.adoc @@ -72,7 +72,7 @@ sql:select * from table where id=:#${property.myId} order by name[?options] --------------------------------------------------------------------------- Notice that the standard `?` symbol that denotes the parameters to an -SQL query is substituted with the `#` symbol, because the `?` symbol is +SQL query is substituted with the `pass:[#]` symbol, because the `?` symbol is used to specify options for the endpoint. The `?` symbol replacement can be configured on endpoint basis. @@ -202,15 +202,15 @@ with the following path and query parameters: The SQL component tries to convert the message body to an object of `java.util.Iterator` type and then uses this iterator to fill the query -parameters (where each query parameter is represented by a `#` symbol +parameters (where each query parameter is represented by a `pass:[#]` symbol (or configured placeholder) in the endpoint URI). If the message body is not an array or collection, the conversion results in an iterator that iterates over only one object, which is the body itself. For example, if the message body is an instance of `java.util.List`, the -first item in the list is substituted into the first occurrence of `#` +first item in the list is substituted into the first occurrence of `pass:[#]` in the SQL query, the second item in the list is substituted into the -second occurrence of `#`, and so on. +second occurrence of `pass:[#]`, and so on. If `batch` is set to `true`, then the interpretation of the inbound message body changes slightly – instead of an iterator of parameters, @@ -285,7 +285,7 @@ outputType=StreamList. |`CamelSqlQuery` |*Camel 2.8:* Query to execute. This query takes precedence over the query specified in the endpoint URI. Note that query parameters in the -header _are_ represented by a `?` instead of a `#` symbol +header _are_ represented by a `?` instead of a `pass:[#]` symbol |======================================================================= When performing `insert` operations, the SQL Component stores the rows diff --git a/components/camel-syslog/src/main/docs/syslog-dataformat.adoc b/components/camel-syslog/src/main/docs/syslog-dataformat.adoc index 3fae97d..2944c48 100644 --- a/components/camel-syslog/src/main/docs/syslog-dataformat.adoc +++ b/components/camel-syslog/src/main/docs/syslog-dataformat.adoc @@ -13,7 +13,7 @@ This component supports the following: SyslogMessage model objects. * Type Converter from/to SyslogMessage and String -* Integration with the <> component. +* Integration with the <> component. * Integration with the <> component. * *Camel 2.14:* Encoder and decoder for the <> component. @@ -40,7 +40,7 @@ as its underlying transport layer mechanism. The UDP port that has been assigned to syslog is 514. To expose a Syslog listener service we reuse the existing -<> component or <> +<> component or <> where we just use the `Rfc3164SyslogDataFormat` to marshal and unmarshal messages. Notice that from *Camel 2.14* onwards the syslog dataformat is renamed to `SyslogDataFormat`. @@ -64,7 +64,7 @@ The Syslog dataformat supports 1 options which are listed below. *Available as of Camel 2.14* To expose a Syslog listener service we reuse the -existing <> component +existing <> component or <> where we just use the `SyslogDataFormat` to marshal and unmarshal messages @@ -93,7 +93,7 @@ as an InputStream: ------------------------------------------------------------------------------------------ -The same route using <> +The same route using <> [source,xml] ------------------------------------------------------------------------- diff --git a/components/camel-thrift/src/main/docs/thrift-dataformat.adoc b/components/camel-thrift/src/main/docs/thrift-dataformat.adoc index 74865a7..d3cd66e 100644 --- a/components/camel-thrift/src/main/docs/thrift-dataformat.adoc +++ b/components/camel-thrift/src/main/docs/thrift-dataformat.adoc @@ -39,12 +39,12 @@ The simple JSON format is write-only (marshal) and produces a simple output form The sample code shows below: [source,java] --------------------------------------------------------------------------------------------------- +---- from("direct:marshal") .unmarshal() .thrift("org.apache.camel.dataformat.thrift.generated.Work", "json") .to("mock:reverse"); --------------------------------------------------------------------------------------------------- +---- ### Thrift overview @@ -59,7 +59,7 @@ This is defined in a .thrift file as so: *tutorial.thrift* [source,java] ------------------------------------------------------------- +---- namespace java org.apache.camel.dataformat.thrift.generated enum Operation { @@ -75,7 +75,7 @@ struct Work { 3: Operation op, 4: optional string comment, } ------------------------------------------------------------- +---- ### Generating Java classes @@ -101,18 +101,18 @@ You can use create the ThriftDataFormat instance and pass it to Camel DataFormat marshal and unmarshal API like this. [source,java] ------------------------------------------------------------------------------------ +---- ThriftDataFormat format = new ThriftDataFormat(new Work()); from("direct:in").marshal(format); from("direct:back").unmarshal(format).to("mock:reverse"); ------------------------------------------------------------------------------------ +---- Or use the DSL thrift() passing the unmarshal default instance or default instance class name like this. [source,java] --------------------------------------------------------------------------------------------------- +---- // You don't need to specify the default instance for the thrift marshaling from("direct:marshal").marshal().thrift(); from("direct:unmarshalA").unmarshal() @@ -120,7 +120,7 @@ default instance class name like this. .to("mock:reverse"); from("direct:unmarshalB").unmarshal().thrift(new Work()).to("mock:reverse"); --------------------------------------------------------------------------------------------------- +---- ### Spring DSL @@ -128,7 +128,7 @@ The following example shows how to use Thrift to unmarshal using Spring configuring the thrift data type [source,java] ----------------------------------------------------------------------------------------------------------- +---- @@ -138,7 +138,7 @@ configuring the thrift data type ----------------------------------------------------------------------------------------------------------- +---- ### Dependencies @@ -146,12 +146,11 @@ To use Thrift in your camel routes you need to add the a dependency on *camel-thrift* which implements this data format. [source,xml] ------------------------------------------ +---- org.apache.camel camel-thrift x.x.x ------------------------------------------ -### See Also +---- -- To stop receiving notification emails like this one, please contact acosentino@apache.org.