Repository: camel Updated Branches: refs/heads/master 284296813 -> 96ee31409
Fixed ascii doc to html converter warnings Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/96ee3140 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/96ee3140 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/96ee3140 Branch: refs/heads/master Commit: 96ee314097ba74a2e6e81a687c030d9317568f8f Parents: 2842968 Author: Claus Ibsen <davscl...@apache.org> Authored: Wed Jan 11 20:13:55 2017 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Wed Jan 11 20:13:55 2017 +0100 ---------------------------------------------------------------------- .../src/main/docs/rest-api-component.adoc | 2 +- camel-core/src/main/docs/return-address.adoc | 8 +- .../camel-bam/src/main/docs/bam-example.adoc | 16 +- .../src/main/docs/bindy-dataformat.adoc | 44 +---- .../src/main/docs/blueprint-testing.adoc | 187 ------------------ .../src/main/docs/cache-component.adoc | 11 +- components/camel-cdi/src/main/docs/cdi.adoc | 97 +++------- .../src/main/docs/crypto-component.adoc | 15 +- .../src/main/docs/pgp-dataformat.adoc | 10 +- .../camel-cxf/src/main/docs/cxf-component.adoc | 8 - .../src/main/docs/cxfrs-component.adoc | 12 +- .../src/main/docs/elasticsearch-component.adoc | 16 +- .../src/main/docs/elsql-component.adoc | 9 +- .../camel-ftp/src/main/docs/ftp-component.adoc | 81 ++------ .../src/main/docs/ganglia-component.adoc | 2 +- .../camel-jasypt/src/main/docs/jasypt.adoc | 71 +------ .../src/main/docs/kafka-component.adoc | 70 +------ .../src/main/docs/mongodb-gridfs.adoc | 189 ------------------- .../src/main/docs/quickfix-component.adoc | 9 - .../camel-scr/src/main/docs/camel-and-scr.adoc | 42 +---- .../camel-spring/src/main/docs/spring.adoc | 64 ++----- .../src/main/docs/test-blueprint.adoc | 18 +- 22 files changed, 120 insertions(+), 861 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/camel-core/src/main/docs/rest-api-component.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/rest-api-component.adoc b/camel-core/src/main/docs/rest-api-component.adoc index 6857be5..ecd52eb 100644 --- a/camel-core/src/main/docs/rest-api-component.adoc +++ b/camel-core/src/main/docs/rest-api-component.adoc @@ -6,7 +6,7 @@ Apache Camel offers a REST styled DSL which can be used with Java or XML. The intention is to allow end users to define REST services using a REST style with verbs such as get, post, delete etc. -#### How it works +### How it works The Rest DSL is a facade that builds link:rest.html[Rest] endpoints as consumers for Camel routes. The actual REST transport is leveraged by http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/camel-core/src/main/docs/return-address.adoc ---------------------------------------------------------------------- diff --git a/camel-core/src/main/docs/return-address.adoc b/camel-core/src/main/docs/return-address.adoc index a75dcad..2ad9884 100644 --- a/camel-core/src/main/docs/return-address.adoc +++ b/camel-core/src/main/docs/return-address.adoc @@ -1,6 +1,4 @@ -[[ReturnAddress-ReturnAddress]] -Return Address -~~~~~~~~~~~~~~ +## Return Address Camel supports the http://www.enterpriseintegrationpatterns.com/ReturnAddress.html[Return @@ -56,8 +54,8 @@ http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/ test case] [[ReturnAddress-UsingThisPattern]] -Using This Pattern -++++++++++++++++++ + +### Using This Pattern If you would like to use this EIP Pattern then please read the link:getting-started.html[Getting Started], you may also find the http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-bam/src/main/docs/bam-example.adoc ---------------------------------------------------------------------- diff --git a/components/camel-bam/src/main/docs/bam-example.adoc b/components/camel-bam/src/main/docs/bam-example.adoc index 072607e..130d04f 100644 --- a/components/camel-bam/src/main/docs/bam-example.adoc +++ b/components/camel-bam/src/main/docs/bam-example.adoc @@ -1,6 +1,4 @@ -[[BAMExample-BusinessActivityMonitor(BAM)Example]] -Business Activity Monitor (BAM) Example -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +## Business Activity Monitor (BAM) Example The link:bam.html[BAM] (Business Activity Monitor) example shows how to monitor your transaction flows using Camel. @@ -17,9 +15,7 @@ amount of time (2 seconds in this example). If an invoice is not generated within the allowed amount of time and error is generated and sent to an link:endpoint.html[Endpoint]. -[[BAMExample-Overview]] -Overview -^^^^^^^^ +### Overview This example lives in the _examples/camel-example-bam_ directory. It will poll the following directories @@ -43,9 +39,7 @@ http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-bam/src/main/ which defines the JPA `EntityManagerFactory` and tells Camel to look in the *org.apache.camel.example.bam* package to find its routes. -[[BAMExample-Codewalkthrough]] -Code walkthrough -^^^^^^^^^^^^^^^^ +### Using BAM So lets start with the activities definition in http://svn.apache.org/repos/asf/camel/trunk/examples/camel-example-bam/src/main/java/org/apache/camel/example/bam/MyActivities.java[MyActivities] @@ -71,9 +65,7 @@ link:components.html[Components] such as link:activemq.html[ActiveMQ], link:jms.html[JMS], link:irc.html[IRC], link:mail.html[Mail], link:xmpp.html[XMPP] etc. -[[BAMExample-Runningtheexample]] -Running the example -^^^^^^^^^^^^^^^^^^^ +### Running the example To run the example we use the link:camel-maven-plugin.html[Camel Maven Plugin]. For example from the source or binary distribution the http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-bindy/src/main/docs/bindy-dataformat.adoc ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/main/docs/bindy-dataformat.adoc b/components/camel-bindy/src/main/docs/bindy-dataformat.adoc index 1cd20c7..e9f5c07 100644 --- a/components/camel-bindy/src/main/docs/bindy-dataformat.adoc +++ b/components/camel-bindy/src/main/docs/bindy-dataformat.adoc @@ -52,15 +52,6 @@ class names instead of package names now. ### Options - - - - - - - - - // dataformat options: START The Bindy dataformat supports 4 options which are listed below. @@ -80,15 +71,6 @@ The Bindy dataformat supports 4 options which are listed below. - - - - - - - - - ### Annotations The annotations created allow to map different concept of your model to @@ -132,8 +114,8 @@ it, like '|' |skipFirstLine |boolean |optional - default value = false - allow to skip the first line of the CSV file -|crlf |string |optional - possible values = WINDOWS,UNIX,MAC, or custom; default value -= WINDOWS - allow to define the carriage return character to use. If you +|crlf |string |optional - possible values = WINDOWS,UNIX,MAC, or custom; default value. +WINDOWS - allow to define the carriage return character to use. If you specify a value other than the three listed before, the value you enter (custom) will be used as the CRLF character(s) @@ -719,8 +701,8 @@ field, we can then add 'padd' characters. |======================================================================= |Parameter name |type |Info -|crlf |string |optional - possible values = WINDOWS,UNIX,MAC, or custom; default value -= WINDOWS - allow to define the carriage return character to use. If you +|crlf |string |optional - possible values = WINDOWS,UNIX,MAC, or custom; default value. +WINDOWS - allow to define the carriage return character to use. If you specify a value other than the three listed before, the value you enter (custom) will be used as the CRLF character(s) @@ -1334,7 +1316,7 @@ Only one attribute/parameter exists for this annotation. *case 1 : Section* -A. Definition of the header section +Definition of the header section *FIX message - Section - Header* @@ -1352,7 +1334,7 @@ public class Header { } --------------------------------------------------------------- -B. Definition of the body section +Definition of the body section *FIX message - Section - Body* @@ -1373,7 +1355,7 @@ public class Order { private String clOrdId; ----------------------------------------------------------------------------------------------------------------- -C. Definition of the footer section +Definition of the footer section *FIX message - Section - Footer* @@ -1427,7 +1409,7 @@ of the Class> Here is the CSV output that we want : -Claus,Ibsen,Camel in Action 1,2010,35 + + Claus,Ibsen,Camel in Action 1,2010,35 + Claus,Ibsen,Camel in Action 2,2012,35 + Claus,Ibsen,Camel in Action 3,2013,35 + Claus,Ibsen,Camel in Action 4,2014,35 @@ -1821,7 +1803,7 @@ is for using Camel 2.16 onwards. <camelContext xmlns="http://camel.apache.org/schema/spring"> - + <dataFormats> <bindy id="bindyDataformat" type="Csv" classType="org.apache.camel.bindy.model.Order"/> </dataFormats> @@ -1842,15 +1824,9 @@ is for using Camel 2.16 onwards. </beans> ------------------------------------------------------------------------------------------------- -[Note] -==== - *Be careful* - -Please verify that your model classes implements serializable otherwise +*Note:* Please verify that your model classes implements serializable otherwise the queue manager will raise an error -==== - ### Dependencies To use Bindy in your camel routes you need to add the a dependency on http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-blueprint/src/main/docs/blueprint-testing.adoc ---------------------------------------------------------------------- diff --git a/components/camel-blueprint/src/main/docs/blueprint-testing.adoc b/components/camel-blueprint/src/main/docs/blueprint-testing.adoc deleted file mode 100644 index e9f6c64..0000000 --- a/components/camel-blueprint/src/main/docs/blueprint-testing.adoc +++ /dev/null @@ -1,187 +0,0 @@ -[[BlueprintTesting-BlueprintTesting]] -Blueprint Testing -~~~~~~~~~~~~~~~~~ - -*Available as of Camel 2.10* - -[Info] -==== - - -*camel-test-blueprint* does only support testing one CamelContext. So if -you have 2 or more CamelContexts in your blueprint XML files, then first -found CamelContext is used during testing. - -==== - -link:testing.html[Testing] is a crucial part of any development or -integration work. Camel supports the definition of -link:using-osgi-blueprint-with-camel.html[Blueprint routes], but given -Blueprint is an OSGi specific technology, writing unit tests is quite -difficult. This library leverages -http://code.google.com/p/pojosr/[PojoSR] which provides a service -registry without using a fully compliant OSGi container. This allows -defining real unit tests (as opposed to integration tests using -http://team.ops4j.org/wiki/display/paxexam/Pax+Exam[Pax Exam]. Please -make sure all test jars in you class path are OSGi bundle. - -Also notice the use of *`getBlueprintDescriptor`* to specify the -location of the OSGi Blueprint XML file. + - If you have multiple OSGi Blueprint XML files, then you can specify -them with a comma-separated list in the *`getBlueprintDescriptor`* -method. - -Here's the -http://svn.apache.org/viewvc/camel/trunk/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelContext.xml?view=markup[Blueprint -XML file]: - -In order to define blueprint tests, add the following dependency in your -pom: - -[source,xml] ------------------------------------------------ -<dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-test-blueprint</artifactId> - <version>2.10</version> - <scope>test</scope> -</dependency> ------------------------------------------------ - -[[BlueprintTesting-Classpathscanning]] -Classpath scanning -^^^^^^^^^^^^^^^^^^ - -By default PojoSR test container scans the test classpath for all the -OSGi bundles available there. All the bundles with Blueprint descriptor -files will be automatically started by the test container. If you would -like to prevent particular bundles from being started by the test -container, override the `getBundleFilter` method, just as demonstrated -on the snippet below. - -[source,java] --------------------------------------------------------------------------------- -@Override -protected String getBundleFilter() { - // I don't want test container to scan and load Logback bundle during the test - return "(!(Bundle-SymbolicName=ch.qos.logback.core))"; -} --------------------------------------------------------------------------------- - -Keep in mind that not specifying the Blueprint descriptor in the -*`getBlueprintDescriptor`* method will not prevent the test container -from loading given descriptor. Bundle filter method is the proper way of -filtering out bundles you don't want to start during the test. - -[[BlueprintTesting-SettingtimeoutwhengettingCamelContext]] -Setting timeout when getting CamelContext -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -*Available as of Camel 2.13.0/2.12.1/2.11.2* - -`CamelBlueprintTestSupport` waits 30 sec for Camel Context to be ready -by default, now you can override this value in two ways: - -* Globally, by setting -`org.apache.camel.test.blueprint.camelContextCreationTimeout` system -property. -* Locally for each test, by overriding _getCamelContextCreationTimeout_ -method. - -[[BlueprintTesting-Addingservicesonstartup]] -Adding services on startup -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -*Available as of Camel 2.11.2/2.12.0* - -When using `camel-test-blueprint` you may do unit tests which requires -using shared services which is not available during unit testing, but -only in the real OSGi container, for example a shared `DataSource`. - -To make it easier to register services on startup, such as a standalone -`DataSource` or any other service, you can override the method -`addServicesOnStartup` when your unit test class extends -`CamelBlueprintTestSupport`. - -In the example below we register a service -`org.apache.camel.test.blueprint.MyService` using the name `myService` -having a property `beer=Carlsberg`, as shown below: - -[source,java] ---------------------------------------------------------------------------------------------------- - @Override - protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) { - services.put("myService", asService(myService, "beer", "Carlsberg")); - } ---------------------------------------------------------------------------------------------------- - -The asService is a builder method that makes it easy to register a -service with a single property. If you need more properties you can use -the `asService` method that takes a `Dictionary` as argument. And if you -do not need any properties, then just pass in `null`, eg: - -[source,java] ------------------------------------------------------- -services.put("myService", asService(myService, null)); ------------------------------------------------------- - -This allows us to use the service by calling a method on it from a Camel -link:bean.html[Bean] component in a route as shown: - -[source,xml] --------------------------------- - <route> - <from uri="direct:start"/> - <to uri="bean:myService"/> - <to uri="mock:result"/> - </route> --------------------------------- - -Notice the bean endpoint uses the service name `myService` which was the -name we registered the service as. You can also use the fully qualified -class name instead, which is more common with OSGi. - -[source,java] ---------------------------------------------------------------------------------------------------- - @Override - protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) { - services.put(MyService.class.getName(), asService(myService, "beer", "Carlsberg")); - } ---------------------------------------------------------------------------------------------------- - -And in the route we use the FQN name: - -[source,xml] ----------------------------------------------------------------- - <route> - <from uri="direct:start"/> - <to uri="bean:org.apache.camel.test.blueprint.MyService"/> - <to uri="mock:result"/> - </route> ----------------------------------------------------------------- - - - -From *Camel 2.16.0*, an additional `addServicesOnStartup` method is -available to be overridden making it ideal for when needing to specify -multiple services with the same interface. - -[source,java] ------------------------------------------------------------------------------------------------------------------- - @Override - protected void addServicesOnStartup(List<KeyValueHolder<String, KeyValueHolder<Object, Dictionary>>> services) { - Dictionary<String, String> dict1 = new Hashtable<String, String>(); - dict1.put("osgi.jndi.service.name", "jdbc/db1"); -  - Dictionary<String, String> dict2 = new Hashtable<String, String>(); - dict2.put("osgi.jndi.service.name", "jdbc/db2"); -  - services.add(asKeyValueService(javax.sql.DataSource.class.getName(), mockService1, dict1)); - services.add(asKeyValueService(javax.sql.DataSource.class.getName(), mockService2, dict2)); - } ------------------------------------------------------------------------------------------------------------------- - -The `asKeyValueService` builder method can be used to construct the -necessary parameters to create the service. The method takes in the name -of the registered service, the object, and and a `Dictionary` as -arguments. http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-cache/src/main/docs/cache-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-cache/src/main/docs/cache-component.adoc b/components/camel-cache/src/main/docs/cache-component.adoc index b5ef8a2..658cd99 100644 --- a/components/camel-cache/src/main/docs/cache-component.adoc +++ b/components/camel-cache/src/main/docs/cache-component.adoc @@ -119,8 +119,6 @@ optional if the CACHE_OPERATION is DELETEALL |======================================================================= #### Message Headers Camel 2.8+ -[Info] -==== Header changes in Camel 2.8 The header names and supported values have changed to be prefixed with @@ -130,7 +128,6 @@ remain unchanged, just their values have been changed. Also, these headers are now removed from the exchange after the cache operation is performed. -==== [width="100%",cols="20%,80%",options="header",] |======================================================================= @@ -424,16 +421,10 @@ replication options are set per `CacheManager` and per `CacheEndpoint`. Also it is the only way when cache names are not know at the development phase. -[Note] -==== - - -It might be useful to read the http://ehcache.org/documentation[EHCache +*Note*: It might be useful to read the http://ehcache.org/documentation[EHCache manual] to get a better understanding of the Camel Cache replication mechanism. -==== - #### Example: JMS cache replication JMS replication is the most powerful and secured replication method. http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-cdi/src/main/docs/cdi.adoc ---------------------------------------------------------------------- diff --git a/components/camel-cdi/src/main/docs/cdi.adoc b/components/camel-cdi/src/main/docs/cdi.adoc index 05832d1..ba333cb 100644 --- a/components/camel-cdi/src/main/docs/cdi.adoc +++ b/components/camel-cdi/src/main/docs/cdi.adoc @@ -1,14 +1,4 @@ -ifdef::env-github[] -:caution-caption: :boom: -:important-caption: :exclamation: -:note-caption: :information_source: -:tip-caption: :bulb: -:warning-caption: :warning: -endif::[] - -[[CDI-CamelCDI]] -Camel CDI -~~~~~~~~~ +## Camel CDI The Camel CDI component provides auto-configuration for Apache Camel using CDI as dependency injection framework based @@ -31,9 +21,7 @@ bridge and the CDI events endpoint only apply starting Camel 2.17. NOTE: More details on how to test Camel CDI applications are available in link:cdi-testing.html[Camel CDI testing]. -[[CDI-Auto-configuredCamelcontext]] -Auto-configured Camel context -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Auto-configured Camel context Camel CDI automatically deploys and configures a `CamelContext` bean. That `CamelContext` bean is automatically instantiated, configured and @@ -53,9 +41,7 @@ type `DefaultCamelContext`. Note that this bean can be customized programmatically and other Camel context beans can be deployed in the application as well. -[[CDI-Auto-detectingCamelroutes]] -Auto-detecting Camel routes -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Auto-detecting Camel routes Camel CDI automatically collects all the `RoutesBuilder` beans in the application, instantiates and add them to the `CamelContext` bean @@ -78,9 +64,7 @@ Besides, `RouteContainer` beans are also automatically collected, instantiated and added to the `CamelContext` bean instance managed by Camel CDI when the container initializes. -[[CDI-Auto-configuredCamelprimitives]] -Auto-configured Camel primitives -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Auto-configured Camel primitives Camel CDI provides beans for common Camel primitives that can be injected in any CDI beans, e.g.: @@ -106,9 +90,7 @@ Endpoint endpoint; TypeConverter converter; ---- -[[CDI-Camelcontextconfiguration]] -Camel context configuration -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Camel context configuration If you just want to change the name of the default `CamelContext` bean, you can used the `@ContextName` qualifier provided by Camel CDI, e.g.: @@ -205,9 +187,7 @@ class ManualStartupCamelContext extends DefaultCamelContext { } ---- -[[CDI-MultipleCamelcontexts]] -Multiple Camel contexts -^^^^^^^^^^^^^^^^^^^^^^^ +### Multiple Camel contexts Any number of `CamelContext` beans can actually be declared in the application as documented above. In that case, the CDI qualifiers @@ -304,9 +284,7 @@ MockEndpoint outbound; // URI defaults to the member name, i.e. mock:outbound Endpoint endpoint; ---- -[[CDI-Configurationproperties]] -Configuration properties -^^^^^^^^^^^^^^^^^^^^^^^^ +### Configuration properties To configure the sourcing of the configuration properties used by Camel to resolve properties placeholders, you can declare @@ -357,9 +335,7 @@ You can see the `camel-example-cdi-properties` example for a working example of a Camel CDI application using DeltaSpike configuration mechanism. -[[CDI-Auto-configuredtypeconverters]] -Auto-configured type converters -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Auto-configured type converters CDI beans annotated with the `@Converter` annotation are automatically registered into the deployed Camel contexts, e.g.: @@ -378,13 +354,9 @@ public class MyTypeConverter { Note that CDI injection is supported within the type converters. -[[CDI-Camelbeanintegration]] -Camel bean integration -^^^^^^^^^^^^^^^^^^^^^^ +### Camel bean integration -[[CDI-Camelannotations]] -Camel annotations -+++++++++++++++++ +#### Camel annotations As part of the Camel link:http://camel.apache.org/bean-integration.html[bean integration], Camel comes with a set @@ -512,9 +484,7 @@ void consume(@Body String body) { | |======================================================================= -[[CDI-Beancomponent]] -Bean component -++++++++++++++ +#### Bean component You can refer to CDI beans, either by type or name, From the Camel DSL, e.g. with the Java Camel DSL: @@ -524,7 +494,7 @@ e.g. with the Java Camel DSL: class MyBean { //... } - + from("direct:inbound").bean(MyBean.class); ---- @@ -536,13 +506,11 @@ Or to lookup a CDI bean by name from the Java DSL: class MyNamedBean { //... } - + from("direct:inbound").bean("foo"); ---- -[[CDI-ReferringbeansfromEndpointURIs]] -Referring beans from Endpoint URIs -++++++++++++++++++++++++++++++++++ +#### Referring beans from Endpoint URIs When configuring endpoints using the URI syntax you can refer to beans in the link:registry.html[Registry] using the `#` notation. If the URI @@ -570,9 +538,7 @@ PlatformTransactionManager createTransactionManager(TransactionManager transacti } ---- -[[CDI-CameleventstoCDIevents]] -Camel events to CDI events -^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Camel events to CDI events *Available as of Camel 2.17* @@ -639,9 +605,7 @@ Note that the support for Camel events translation into CDI events is only activated if observer methods listening for Camel events are detected in the deployment, and that per Camel context. -[[CDI-CDIeventsendpoint]] -CDI events endpoint -^^^^^^^^^^^^^^^^^^^ +### CDI events endpoint *Available as of Camel 2.17* @@ -787,9 +751,7 @@ endpoint instances and the observer methods as the CDI container doesn't have any ways of discovering the Camel context model during the deployment phase. -[[CDI-CamelXMLconfigurationimport]] -Camel XML configuration import -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Camel XML configuration import *Available as of Camel 2.18* @@ -873,9 +835,7 @@ configuration, e.g.: <camelContext/> ---- -[[CDI-Auto-configuredOSGiintegration]] -Auto-configured OSGi integration -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Auto-configured OSGi integration *Available as of Camel 2.17* @@ -898,9 +858,7 @@ See the `camel-example-cdi-osgi` example for a working example of the Camel CDI OSGi integration. -[[CDI-ProgrammaticLazyInjectionProgrammaticLookup]] -Lazy Injection / Programmatic Lookup -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Lazy Injection / Programmatic Lookup While the CDI programmatic model favors a http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#typesafe_resolution[typesafe resolution] mechanism that occurs at application initialization time, it is possible to perform @@ -984,9 +942,7 @@ for (CamelContext context : contexts) ---- -[[CDI-MavenArchetype]] -Maven Archetype -^^^^^^^^^^^^^^^ +### Maven Archetype Among the available link:camel-maven-archetypes.html[Camel Maven archetypes], you can use the provided `camel-archetype-cdi` to generate @@ -997,9 +953,7 @@ a Camel CDI Maven project, e.g.: mvn archetype:generate -DarchetypeGroupId=org.apache.camel.archetypes -DarchetypeArtifactId=camel-archetype-cdi ---- -[[CDI-Supportedcontainers]] -Supported containers -^^^^^^^^^^^^^^^^^^^^ +### Supported containers The Camel CDI component is compatible with any CDI 1.0, CDI 1.1 and CDI 1.2 compliant runtime. It's been successfully tested against the @@ -1020,9 +974,8 @@ following runtimes: |Karaf |4.0.4 |CDI 1.2 / OSGi 6 / PAX CDI |============================================ -[[CDI-Examples]] -Examples -^^^^^^^^ + +### Examples The following examples are available in the `examples` directory of the Camel project: @@ -1070,9 +1023,7 @@ in Java with CDI dependency Injection |============================================ -[[CDI-SeeAlso]] -See Also -^^^^^^^^ +### See Also * link:cdi-testing.html[Camel CDI testing] * http://www.cdi-spec.org[CDI specification Web site] http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-crypto/src/main/docs/crypto-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-crypto/src/main/docs/crypto-component.adoc b/components/camel-crypto/src/main/docs/crypto-component.adoc index 1550211..dc57907 100644 --- a/components/camel-crypto/src/main/docs/crypto-component.adoc +++ b/components/camel-crypto/src/main/docs/crypto-component.adoc @@ -387,27 +387,25 @@ libraries available from http://www.bouncycastle.org/java.html[http://www.bouncycastle.org/java.html] if you would prefer to do it that way. -1. Install the command line utilities on linux +Install the command line utilities on linux [source,java] --------------------- apt-get install gnupg --------------------- -2. Create your keyring, entering a secure password +Create your keyring, entering a secure password [source,java] ------------- gpg --gen-key ------------- -3. If you need to import someone elses public key so that you can -encrypt a file for them. +If you need to import someone elses public key so that you can encrypt a file for them. [source,java] -------------------------- gpg --import <filename.key -------------------------- -4. The following files should now exist and can be used to run the -example +The following files should now exist and can be used to run the example [source,java] ----------------------------------------------- @@ -448,13 +446,14 @@ from("direct:start") ... ------------------------------------------------------------------------------------------------------------------------------------------ -* The functionality is especially useful to support the key exchange. If +The functionality is especially useful to support the key exchange. If you want to exchange the private key for decrypting you can accept for a period of time messages which are either encrypted with the old or new corresponding public key. Or if the sender wants to exchange his signer private key, you can accept for a period of time, the old or new signer key. -* Technical background: The PGP encrypted data contains a Key ID of the + +Technical background: The PGP encrypted data contains a Key ID of the public key which was used to encrypt the data. This Key ID can be used to locate the private key in the secret keyring to decrypt the data. The same mechanism is also used to locate the public key for verifying a http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-crypto/src/main/docs/pgp-dataformat.adoc ---------------------------------------------------------------------- diff --git a/components/camel-crypto/src/main/docs/pgp-dataformat.adoc b/components/camel-crypto/src/main/docs/pgp-dataformat.adoc index 71a2596..c3dfec6 100644 --- a/components/camel-crypto/src/main/docs/pgp-dataformat.adoc +++ b/components/camel-crypto/src/main/docs/pgp-dataformat.adoc @@ -121,27 +121,25 @@ libraries available from http://www.bouncycastle.org/java.html[http://www.bouncycastle.org/java.html] if you would prefer to do it that way. -1. Install the command line utilities on linux +Install the command line utilities on linux [source,java] --------------------- apt-get install gnupg --------------------- -2. Create your keyring, entering a secure password +Create your keyring, entering a secure password [source,java] ------------- gpg --gen-key ------------- -3. If you need to import someone elses public key so that you can -encrypt a file for them. +If you need to import someone elses public key so that you can encrypt a file for them. [source,java] -------------------------- gpg --import <filename.key -------------------------- -4. The following files should now exist and can be used to run the -example +The following files should now exist and can be used to run the example [source,java] ----------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-cxf/src/main/docs/cxf-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-cxf/src/main/docs/cxf-component.adoc b/components/camel-cxf/src/main/docs/cxf-component.adoc index fc32eb8..62ac0b9 100644 --- a/components/camel-cxf/src/main/docs/cxf-component.adoc +++ b/components/camel-cxf/src/main/docs/cxf-component.adoc @@ -78,14 +78,6 @@ for this component: </dependency> ------------------------------------------------------------ -[Tip] -==== -CXF dependencies - -If you want to learn about CXF dependencies you can checkout the -`WHICH-JARS` text file. - -==== ### URI format http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-cxf/src/main/docs/cxfrs-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-cxf/src/main/docs/cxfrs-component.adoc b/components/camel-cxf/src/main/docs/cxfrs-component.adoc index d3ffe40..14010c0 100644 --- a/components/camel-cxf/src/main/docs/cxfrs-component.adoc +++ b/components/camel-cxf/src/main/docs/cxfrs-component.adoc @@ -1,8 +1,8 @@ ## CXF-RS Component -[Note] -==== - +The *cxfrs:* component provides integration with +http://cxf.apache.org[Apache CXF] for connecting to JAX-RS 1.1 and 2.0 +services hosted in CXF. When using CXF as a consumer, the link:cxf-bean-component.html[CXF Bean Component] allows you to factor out how message payloads are received @@ -11,12 +11,6 @@ potential of using a multitude of transports to consume web services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF. -==== - -The *cxfrs:* component provides integration with -http://cxf.apache.org[Apache CXF] for connecting to JAX-RS 1.1 and 2.0 -services hosted in CXF. - Maven users will need to add the following dependency to their pom.xml for this component: http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-elasticsearch/src/main/docs/elasticsearch-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-elasticsearch/src/main/docs/elasticsearch-component.adoc b/components/camel-elasticsearch/src/main/docs/elasticsearch-component.adoc index 650f41e..ffa9e5e 100644 --- a/components/camel-elasticsearch/src/main/docs/elasticsearch-component.adoc +++ b/components/camel-elasticsearch/src/main/docs/elasticsearch-component.adoc @@ -25,16 +25,6 @@ for this component: elasticsearch://clusterName[?options] ------------------------------------- -[Tip] -==== - - -if you want to run against a local (in JVM/classloader) ElasticSearch -server, just set the clusterName value in the URI to "local". See the -http://www.elasticsearch.org/guide/reference/java-api/client.html[client -guide] for more details. - -==== ### Endpoint Options @@ -81,6 +71,12 @@ The Elasticsearch component supports 12 endpoint options which are listed below: {% endraw %} // endpoint options: END +### Local testing + +If you want to run against a local (in JVM/classloader) ElasticSearch +server, just set the clusterName value in the URI to "local". See the +http://www.elasticsearch.org/guide/reference/java-api/client.html[client +guide] for more details. ### Message Operations http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-elsql/src/main/docs/elsql-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-elsql/src/main/docs/elsql-component.adoc b/components/camel-elsql/src/main/docs/elsql-component.adoc index 9d5582d..8759208 100644 --- a/components/camel-elsql/src/main/docs/elsql-component.adoc +++ b/components/camel-elsql/src/main/docs/elsql-component.adoc @@ -9,6 +9,9 @@ https://github.com/OpenGamma/ElSql[ElSql] to define the SQL queries. This component uses `spring-jdbc` behind the scenes for the actual SQL handling. +This component can be used as a +http://camel.apache.org/transactional-client.html[Transactional Client]. + Maven users will need to add the following dependency to their `pom.xml` for this component: @@ -22,12 +25,6 @@ for this component: </dependency> ------------------------------------------------------------ -[Info] -==== -This component can be used as a -http://camel.apache.org/transactional-client.html[Transactional Client]. -==== - The SQL component uses the following endpoint URI notation: [source,java] http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-ftp/src/main/docs/ftp-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-ftp/src/main/docs/ftp-component.adoc b/components/camel-ftp/src/main/docs/ftp-component.adoc index 502eb94..9247fe5 100644 --- a/components/camel-ftp/src/main/docs/ftp-component.adoc +++ b/components/camel-ftp/src/main/docs/ftp-component.adoc @@ -3,6 +3,13 @@ This component provides access to remote file systems over the FTP and SFTP protocols. +When consuming from remote FTP server make sure you read the section titled _Default when consuming files_ +further below for details related to consuming files. + +Absolute path is *not* supported. *Camel 2.16* will translate absolute path to relative by trimming all +leading slashes from `directoryname`. There'll be WARN message printed +in the logs. + Maven users will need to add the following dependency to their `pom.xml` for this component: @@ -16,35 +23,6 @@ for this component: </dependency> ----------------------------------------------------------------------- -[Info] -==== -More options - -See link:file2.html[File] for more options as all the options from -link:file2.html[File] is inherited. - -==== - -[Info] -==== -Absolute paths - -Absolute path is *not* supported. - -*Camel 2.16* will translate absolute path to relative by trimming all -leading slashes from `directoryname`. There'll be WARN message printed -in the logs. - -==== - -[Tip] -==== -Consuming from remote FTP server - -Make sure you read the section titled _Default when consuming files_ -further below for details related to consuming files. - -==== ### URI format @@ -91,14 +69,6 @@ Layer (SSL) cryptographic protocols. The options below are exclusive for the FTP component. -[Info] -==== -More options - -See link:file2.html[File] for more options as all the options from -link:file2.html[File] is inherited. - -==== // component options: START The FTP component has no options. @@ -106,12 +76,6 @@ The FTP component has no options. - - - - - - // endpoint options: START The FTP component supports 105 endpoint options which are listed below: @@ -230,16 +194,7 @@ The FTP component supports 105 endpoint options which are listed below: - - - - - - - -[Info] -==== -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 @@ -250,8 +205,6 @@ the `ftpClient.trustStore.xxx` options or by configuring a custom When using `sslContextParameters`, the trust store is managed by the configuration of the provided SSLContextParameters instance. -==== - You can configure additional options on the `ftpClient` and `ftpClientConfig` from the URI directly by using the `ftpClient.` or `ftpClientConfig.` prefix. @@ -302,14 +255,6 @@ from("ftp://foo@myserver?password=secret&ftpClientConfig=#myConfig").to("bean:fo ### More URI options -[Info] -==== - - -See link:file2.html[File2] as all the options there also applies for -this component. - -==== ### Examples @@ -318,8 +263,8 @@ this component. `ftp://someonee...@someotherftpserver.co.uk:12049/reports/2008/password=secret&binary=false` + `ftp://publicftpserver.com/download` -[Warning] -==== +### Concurrency + FTP Consumer does not support concurrency The FTP consumer (with the same endpoint) does not support concurrency @@ -329,11 +274,7 @@ is only a single endpoint that does not support concurrent consumers. The FTP producer does *not* have this issue, it supports concurrency. -==== - -[Tip] -==== -More information +### More information This component is an extension of the link:file2.html[File] component. So there are more samples and details on the link:file2.html[File] http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-ganglia/src/main/docs/ganglia-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-ganglia/src/main/docs/ganglia-component.adoc b/components/camel-ganglia/src/main/docs/ganglia-component.adoc index 33e4d54..def63ca 100644 --- a/components/camel-ganglia/src/main/docs/ganglia-component.adoc +++ b/components/camel-ganglia/src/main/docs/ganglia-component.adoc @@ -1,6 +1,6 @@ ## Ganglia Component -#### Available as of Camel 2.15.0 +*Available as of Camel 2.15.0* Provides a mechanism to send a value (the message body) as a metric to the http://ganglia.info[Ganglia] monitoring system. Uses the gmetric4j http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-jasypt/src/main/docs/jasypt.adoc ---------------------------------------------------------------------- diff --git a/components/camel-jasypt/src/main/docs/jasypt.adoc b/components/camel-jasypt/src/main/docs/jasypt.adoc index f8467cb..41b2f26 100644 --- a/components/camel-jasypt/src/main/docs/jasypt.adoc +++ b/components/camel-jasypt/src/main/docs/jasypt.adoc @@ -1,6 +1,4 @@ -[[Jasypt-Jasyptcomponent]] -Jasypt component -~~~~~~~~~~~~~~~~ +## Jasypt component *Available as of Camel 2.5* @@ -25,9 +23,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[Jasypt-Tooling]] -Tooling -^^^^^^^ +### Tooling The link:jasypt.html[Jasypt] component provides a little command line tooling to encrypt or decrypt values. @@ -90,45 +86,7 @@ The idea is then to use those encrypted values in your link:properties.html[Properties] files. Notice how the password value is encrypted and the value has the tokens surrounding `ENC(value here)` -[[Jasypt-ToolingdependenciesforCamel2.5and2.6]] -Tooling dependencies for Camel 2.5 and 2.6 -++++++++++++++++++++++++++++++++++++++++++ - -The tooling requires the following JARs in the classpath, which has been -enlisted in the `MANIFEST.MF` file of `camel-jasypt` with `optional/` as -prefix. Hence why the java cmd above can pickup the needed JARs from the -Apache Distribution in the `optional` directory. - -[source,java] -------------------------------------------------------------------------- -jasypt-1.6.jar commons-lang-2.4.jar commons-codec-1.4.jar icu4j-4.0.1.jar -------------------------------------------------------------------------- - -[Info] -==== - *Java 1.5 users* - -The `icu4j-4.0.1.jar` is only needed when running on JDK 1.5. - -This JAR is not distributed by Apache Camel and you have to download it -manually and copy it to the `lib/optional` directory of the Camel -distribution. + - You can download it from -http://repo2.maven.org/maven2/com/ibm/icu/icu4j/4.0.1/[Apache Central -Maven repo]. - -==== - -[[Jasypt-ToolingdependenciesforCamel2.7orbetter]] -Tooling dependencies for Camel 2.7 or better -++++++++++++++++++++++++++++++++++++++++++++ - -Jasypt 1.7 onwards is now fully standalone so no additional JARs is -needed. - -[[Jasypt-URIOptions]] -URI Options -^^^^^^^^^^^ +### URI Options The options below are exclusive for the link:jasypt.html[Jasypt] component. @@ -143,9 +101,8 @@ mandatory. See below for more details. |`algorithm` |`null` |`String` |Name of an optional algorithm to use. |======================================================================= -[[Jasypt-Protectingthemasterpassword]] -Protecting the master password -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +### Protecting the master password The master password used by link:jasypt.html[Jasypt] must be provided, so that it's capable of decrypting the values. However having this @@ -176,9 +133,7 @@ $ unset CAMEL_ENCRYPTION_PASSWORD The `password` option is then a matter of defining as follows: `password=sysenv:CAMEL_ENCRYPTION_PASSWORD`. -[[Jasypt-ExamplewithJavaDSL]] -Example with Java DSL -^^^^^^^^^^^^^^^^^^^^^ +### Example with Java DSL In Java DSL you need to configure link:jasypt.html[Jasypt] as a `JasyptPropertiesParser` instance and set it on the @@ -188,9 +143,7 @@ The properties file `myproperties.properties` then contain the encrypted value, such as shown below. Notice how the password value is encrypted and the value has the tokens surrounding `ENC(value here)` -[[Jasypt-ExamplewithSpringXML]] -Example with Spring XML -^^^^^^^^^^^^^^^^^^^^^^^ +### Example with Spring XML In Spring XML you need to configure the `JasyptPropertiesParser` which is shown below. Then the Camel link:properties.html[Properties] @@ -240,9 +193,7 @@ link:jasypt.html[Jasypt]. </camelContext> -------------------------------------------------------------------------------------------------------------- -[[Jasypt-ExamplewithBlueprintXML]] -Example with Blueprint XML -^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Example with Blueprint XML In Blueprint XML you need to configure the `JasyptPropertiesParser` which is shown below. Then the @@ -318,11 +269,7 @@ to link:jasypt.html[Jasypt]. </blueprint> ---------------------------------------------------------------------------------------------------------------- - - -[[Jasypt-SeeAlso]] -See Also -^^^^^^^^ +### See Also * link:security.html[Security] * link:properties.html[Properties] http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-kafka/src/main/docs/kafka-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-kafka/src/main/docs/kafka-component.adoc b/components/camel-kafka/src/main/docs/kafka-component.adoc index 79b7c50..9abc23c 100644 --- a/components/camel-kafka/src/main/docs/kafka-component.adoc +++ b/components/camel-kafka/src/main/docs/kafka-component.adoc @@ -8,6 +8,8 @@ http://kafka.apache.org/[Apache Kafka] message broker. Maven users will need to add the following dependency to their `pom.xml` for this component. +From Camel 2.17 onwards Scala is no longer used, as we use the kafka java client. + [source,xml] ------------------------------------------------------------ <dependency> @@ -18,24 +20,6 @@ for this component. </dependency> ------------------------------------------------------------ -#### Camel 2.17 or newer - -Scala is no longer used, as we use the kafka java client. - -#### Camel 2.16 or older - -And then the Scala libraries of choice. camel-kafka does not include -that dependency, but assumes it is provided. For example to use Scala -2.10.4 add: - -[source,xml] --------------------------------------------- - <dependency> - <groupId>org.scala-lang</groupId> - <artifactId>scala-library</artifactId> - <version>2.10.4</version> - </dependency> --------------------------------------------- ### URI format @@ -44,12 +28,8 @@ that dependency, but assumes it is provided. For example to use Scala kafka:server:port[?options] --------------------------- - - -### Options (Camel 2.16 or older) - - +### Options // component options: START @@ -68,24 +48,6 @@ The Kafka component supports 1 options which are listed below. - - - - - - - - - - - - - - - - - - // endpoint options: START The Kafka component supports 77 endpoint options which are listed below: @@ -177,19 +139,6 @@ The Kafka component supports 77 endpoint options which are listed below: - - - - - - - - - - - - - For more information about Producer/Consumer configuration: http://kafka.apache.org/documentation.html#newconsumerconfigs[http://kafka.apache.org/documentation.html#newconsumerconfigs] @@ -197,19 +146,6 @@ http://kafka.apache.org/documentation.html#producerconfigs[http://kafka.apache.o ### Samples -#### Camel 2.16 or older - -Consuming messages: - -[source,java] ------------------------------------------------------------------------------------------------------------------- -from("kafka:localhost:9092?topic=test&zookeeperHost=localhost&zookeeperPort=2181&groupId=group1").to("log:input"); ------------------------------------------------------------------------------------------------------------------- - -Producing messages: - -See unit tests of camel-kafka for more examples - #### Camel 2.17 or newer Consuming messages: http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs.adoc ---------------------------------------------------------------------- diff --git a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs.adoc b/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs.adoc deleted file mode 100644 index 8c055fd..0000000 --- a/components/camel-mongodb-gridfs/src/main/docs/mongodb-gridfs.adoc +++ /dev/null @@ -1,189 +0,0 @@ -[[MongoDBGridFS-CamelMongoDBGridFScomponent]] -Camel MongoDB GridFS component -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -*Available as of Camel 2.17* - -Maven users will need to add the following dependency to their `pom.xml` -for this component: - -[source,xml] ------------------------------------------------------------- -<dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-mongodb-gridfs</artifactId> - <version>x.y.z</version> - <!-- use the same version as your Camel core version --> -</dependency> ------------------------------------------------------------- - -[[MongoDBGridFS-URIformat]] -URI format -~~~~~~~~~~ - -[source,java] ------------------------------------------------------------------------------- -gridfs:connectionBean?database=databaseName&bucket=bucketName[&moreOptions...] ------------------------------------------------------------------------------- - -[[MongoDBGridFS-options]] -MongoDB GridFS options -~~~~~~~~~~~~~~~~~~~~~~ - -// component options: START -// component options: END - -// endpoint options: START -// endpoint options: END - -[[MongoDBGridFS-ConfigurationofdatabaseinSpringXML]] -Configuration of database in Spring XML -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The following Spring XML creates a bean defining the connection to a -MongoDB instance. - -[source,xml] ----------------------------------------------------------------------------------------------------------------------------------- -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - <bean id="mongoBean" class="com.mongodb.Mongo"> - <constructor-arg name="host" value="${mongodb.host}" /> - <constructor-arg name="port" value="${mongodb.port}" /> - </bean> -</beans> ----------------------------------------------------------------------------------------------------------------------------------- - -[[MongoDBGridFS-Sampleroute]] -Sample route -^^^^^^^^^^^^ - -The following route defined in Spring XML executes the operation -link:mongodb-gridfs.html[*findOne*] on a collection. - -*Get a file from GridFS* - -[source,xml] ----------------------------------------------------------------------------------- -<route> - <from uri="direct:start" /> - <!-- using bean 'mongoBean' defined above --> - <to uri="gridfs:mongoBean?database=${mongodb.database}&operation=findOne" /> - <to uri="direct:result" /> -</route> ----------------------------------------------------------------------------------- - - - -[[MongoDBGridFS-GridFSoperations-producerendpoint]] -GridFS operations - producer endpoint -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -[[MongoDBGridFS-count]] -count -+++++ - -Returns the total number of file in the collection, returning an Integer -as the OUT message body. + - + - -[source,java] ---------------------------------------------------------------------------------- -// from("direct:count").to("gridfs?database=tickets&operation=count"); -Integer result = template.requestBodyAndHeader("direct:count", "irrelevantBody"); -assertTrue("Result is not of type Long", result instanceof Integer); ---------------------------------------------------------------------------------- - -You can provide a filename header to provide a count of files matching -that filename. - -[source,java] -------------------------------------------------------------------------------- -Map<String, Object> headers = new HashMap<String, Object>(); -headers.put(Exchange.FILE_NAME, "filename.txt"); -Integer count = template.requestBodyAndHeaders("direct:count", query, headers); -------------------------------------------------------------------------------- - -[[MongoDBGridFS-listAll]] -listAll -+++++++ - -Returns an Reader that lists all the filenames and their IDs in a tab -separated stream. - -[source,java] ----------------------------------------------------------------------------------- -// from("direct:listAll").to("gridfs?database=tickets&operation=listAll"); -Reader result = template.requestBodyAndHeader("direct:listAll", "irrelevantBody"); - -filename1.txt 1252314321 -filename2.txt 2897651254 ----------------------------------------------------------------------------------- - - - -[[MongoDBGridFS-findOne]] -*findOne* -+++++++++ - -Finds a file in the GridFS system and sets the body to an InputStream of -the content.  Also provides the metadata has headers.  It uses -Exchange.FILE_NAME from the incoming headers to determine the file to -find. - -[source,java] -------------------------------------------------------------------------------------------------- -// from("direct:findOne").to("gridfs?database=tickets&operation=findOne"); -Map<String, Object> headers = new HashMap<String, Object>(); -headers.put(Exchange.FILE_NAME, "filename.txt"); -InputStream result = template.requestBodyAndHeaders("direct:findOne", "irrelevantBody", headers); -------------------------------------------------------------------------------------------------- - - - -[[MongoDBGridFS-create]] -create -++++++ - -Creates a new file in the GridFs database. It uses the -Exchange.FILE_NAME from the incoming headers for the name and the body -contents (as an InputStream) as the content. - -[source,java] ------------------------------------------------------------------------- -// from("direct:create").to("gridfs?database=tickets&operation=create"); -Map<String, Object> headers = new HashMap<String, Object>(); -headers.put(Exchange.FILE_NAME, "filename.txt"); -InputStream stream = ... the data for the file ... -template.requestBodyAndHeaders("direct:create", stream, headers); ------------------------------------------------------------------------- - -[[MongoDBGridFS-remove]] -remove -++++++ - -Removes a file from the GridFS database. - -[source,java] ------------------------------------------------------------------------- -// from("direct:remove").to("gridfs?database=tickets&operation=remove"); -Map<String, Object> headers = new HashMap<String, Object>(); -headers.put(Exchange.FILE_NAME, "filename.txt"); -template.requestBodyAndHeaders("direct:remove", "", headers); ------------------------------------------------------------------------- - -[[MongoDBGridFS-GridFSConsumer]] -GridFS Consumer -^^^^^^^^^^^^^^^ - -See also - -* http://www.mongodb.org/[MongoDB website] -* http://en.wikipedia.org/wiki/NoSQL[NoSQL Wikipedia article] -* http://api.mongodb.org/java/current/[MongoDB Java driver API docs - -current version] -* -http://svn.apache.org/viewvc/camel/trunk/components/camel-mongodb/src/test/[Unit -tests] for more examples of usage - http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-quickfix/src/main/docs/quickfix-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-quickfix/src/main/docs/quickfix-component.adoc b/components/camel-quickfix/src/main/docs/quickfix-component.adoc index aa0f021..dd9ba87 100644 --- a/components/camel-quickfix/src/main/docs/quickfix-component.adoc +++ b/components/camel-quickfix/src/main/docs/quickfix-component.adoc @@ -7,15 +7,6 @@ http://www.quickfixj.org/[QuickFIX/J] FIX engine for using in Camel . This component uses the standard http://www.fixprotocol.org/[Financial Interchange (FIX) protocol] for message transport. -[Info] -==== -**Previous Versions** - -The *quickfix* component was rewritten for Camel 2.5. For information -about using the *quickfix* component prior to 2.5 see the documentation -section below. - -==== Maven users will need to add the following dependency to their `pom.xml` for this component: http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-scr/src/main/docs/camel-and-scr.adoc ---------------------------------------------------------------------- diff --git a/components/camel-scr/src/main/docs/camel-and-scr.adoc b/components/camel-scr/src/main/docs/camel-and-scr.adoc index 577fd93..b4cfe39 100644 --- a/components/camel-scr/src/main/docs/camel-and-scr.adoc +++ b/components/camel-scr/src/main/docs/camel-and-scr.adoc @@ -1,6 +1,4 @@ -[[CamelandSCR-WorkingwithCamelandSCR]] -Working with Camel and SCR -~~~~~~~~~~~~~~~~~~~~~~~~~~ +## Working with Camel and SCR SCR stands for Service Component Runtime and is an implementation of OSGi Declarative Services specification. SCR enables any plain old Java @@ -17,9 +15,7 @@ completely in Java world; there is no need to edit XML or properties files. This offers you full control over everything and means your IDE of choice knows exactly what is going on in your project. -[[CamelandSCR-CamelSCRsupport]] -Camel SCR support -^^^^^^^^^^^^^^^^^ +### Camel SCR support INFO: *Available as of Camel 2.15.0*. Camel-scr bundle is not included in Apache Camel versions prior 2.15.0, @@ -49,13 +45,9 @@ the following `org.apache.felix.scr.annotations` on class level: }) --------------------------------------------------------------------------------------------------------------- - - Then implement `getRouteBuilders()` method which returns the Camel routes you want to run: - - *Implement getRouteBuilders()* [source,java] @@ -311,9 +303,7 @@ allows you to create more instances of your routes just by providing alternative configurations. More on this in section _Using Camel SCR bundle as a template_. -[[CamelandSCR-AbstractCamelRunnerlifecycleinSCR]] -AbstractCamelRunner's lifecycle in SCR -++++++++++++++++++++++++++++++++++++++ +### AbstractCamelRunner's lifecycle in SCR 1. When component's configuration policy and mandatory references are satisfied SCR calls `activate()`. This creates and sets up a @@ -339,9 +329,7 @@ In (non-OSGi) unit tests you should use `prepare()` â `run()` â `stop()` instead of `activate()` â `deactivate()` for more fine-grained control. Also, this allows us to avoid possible SCR specific operations in tests. -[[CamelandSCR-Usingcamel-archetype-scr]] -Using camel-archetype-scr -^^^^^^^^^^^^^^^^^^^^^^^^^ +### Using camel-archetype-scr The easiest way to create an Camel SCR bundle project is to use `camel-archetype-scr` and Maven. @@ -389,9 +377,7 @@ mvn install and the bundle is ready to be deployed. -[[CamelandSCR-UnittestingCamelroutes]] -Unit testing Camel routes -^^^^^^^^^^^^^^^^^^^^^^^^^ +### Unit testing Camel routes Service Component is a POJO and has no special requirements for (non-OSGi) unit testing. There are however some techniques that are @@ -581,9 +567,7 @@ Here we start the Service Component and along with it the routes. Here we send a message to a route in test. -[[CamelandSCR-RunningthebundleinApacheKaraf]] -Running the bundle in Apache Karaf -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Running the bundle in Apache Karaf Once the bundle has been built with `mvn install` it's ready to be deployed. To deploy the bundle on Apache Karaf perform the following @@ -611,9 +595,7 @@ karaf@root> log:tail -n 10 Press ctrl-c to stop watching the log. ------------------------------------------------------------------------ -[[CamelandSCR-Overridingthedefaultconfiguration]] -Overriding the default configuration -++++++++++++++++++++++++++++++++++++ +#### Overriding the default configuration By default, Service Component's configuration PID equals the fully qualified name of its class. You can change the example bundle's @@ -630,9 +612,7 @@ karaf@root> config:propset -p example.CamelScrExample messageOk "This is better Or you can change the configuration by editing property files in Karaf's `etc` folder. -[[CamelandSCR-UsingCamelSCRbundleasatemplate]] -Using Camel SCR bundle as a template -++++++++++++++++++++++++++++++++++++ +#### Using Camel SCR bundle as a template Let's say you have a Camel SCR bundle that implements an integration pattern that you use frequently, say, *from â to*, with success/failure @@ -662,9 +642,7 @@ karaf@root> config:update This will start a new CamelContext with your overridden properties. How convenient. -[Tip] -==== - +### Notes When designing a Service Component to be a template you typically don't want it to start without a "tailed" configuration i.e. with the default @@ -673,5 +651,3 @@ configuration. To prevent your Service Component from starting with the default configuration add `policy = ConfigurationPolicy.REQUIRE `to the class level `@Component` annotation. - -==== http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-spring/src/main/docs/spring.adoc ---------------------------------------------------------------------- diff --git a/components/camel-spring/src/main/docs/spring.adoc b/components/camel-spring/src/main/docs/spring.adoc index 8435f4e..fea8c87 100644 --- a/components/camel-spring/src/main/docs/spring.adoc +++ b/components/camel-spring/src/main/docs/spring.adoc @@ -1,6 +1,4 @@ -[[Spring-SpringSupport]] -Spring Support -~~~~~~~~~~~~~~ +## Spring Support Apache Camel is designed to work nicely with the http://www.springframework.org/[Spring Framework] in a number of ways. @@ -31,9 +29,7 @@ link:test.html[Test] endpoints * From *Camel 2.15* onwards Camel supports Spring Boot using the `camel-spring-boot` component. -[[Spring-UsingSpringtoconfiguretheCamelContext]] -Using Spring to configure the CamelContext -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +### Using Spring to configure the CamelContext You can configure a CamelContext inside any spring.xml using the http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/CamelContextFactoryBean.html[CamelContextFactoryBean]. @@ -48,9 +44,7 @@ instances. ** Using Java Code ** Using Spring XML -[[Spring-AddingCamelSchema]] -Adding Camel Schema -^^^^^^^^^^^^^^^^^^^ +### Adding Camel Schema For Camel 1.x you need to use the following namespace: @@ -84,9 +78,7 @@ So the XML file looks like this: http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd"> ------------------------------------------------------------------------------------------------------------------ -[[Spring-Usingcamelnamespace]] -Using camel: namespace -++++++++++++++++++++++ +#### Using camel: namespace Or you can refer to camel XSD in the XML declaration: @@ -117,26 +109,20 @@ inline namespace declaration: </camel:camelContext> -------------------------------------------------------------------------------------------- -[[Spring-AdvancedconfigurationusingSpring]] -Advanced configuration using Spring -+++++++++++++++++++++++++++++++++++ +#### Advanced configuration using Spring See more details at link:advanced-configuration-of-camelcontext-using-spring.html[Advanced configuration of CamelContext using Spring] -[[Spring-UsingJavaCode]] -Using Java Code -^^^^^^^^^^^^^^^ +$### Using Java Code You can use Java Code to define your link:routebuilder.html[RouteBuilder] implementations. These can be defined as beans in spring and then referenced in your camel context e.g. -[[Spring-Usingpackage]] -Using <package> -+++++++++++++++ +#### Using <package> Camel also provides a powerful feature that allows for the automatic discovery and initialization of routes in given packages. This is @@ -165,9 +151,7 @@ been created by Spring etc. So if you define a route builder as a spring bean tag then that class will be skipped. You can include those beans using `<routeBuilder ref="theBeanId"/>` or the `<contextScan>` feature. -[[Spring-UsingpackageScan]] -Using <packageScan> -+++++++++++++++++++ +#### Using <packageScan> In Camel 2.0 this has been extended to allow selective inclusion and exclusion of discovered route classes using Ant like path matching. In @@ -223,9 +207,7 @@ org.apache.camel.SomeExcludedRoute or org.example.RouteWhichIsExcluded **.??cluded* would match org.simple.IncludedRoute, org.simple.Excluded but not match org.simple.PrecludedRoute -[[Spring-UsingcontextScan]] -Using contextScan -+++++++++++++++++ +#### Using contextScan *Available as of Camel 2.4* @@ -252,9 +234,7 @@ public class MyRoute extends SpringRouteBuilder { You can also use the ANT style for inclusion and exclusion, as mentioned above in the `<packageScan>` documentation. -[[Spring-HowdoIimportroutesfromotherXMLfiles]] -How do I import routes from other XML files -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +### How do I import routes from other XML files *Available as of Camel 2.3* @@ -296,9 +276,7 @@ The routes defined in `<routeContext/>` can be reused by multiple runtime each CamelContext will create its own instance of the route based on the definition. -[[Spring-Testtimeexclusion]] -Test time exclusion. -++++++++++++++++++++ +#### Test time exclusion. At test time it is often desirable to be able to selectively exclude matching routes from being initalized that are not applicable or useful @@ -351,18 +329,14 @@ protected Class[] excludeRoutes() { } --------------------------------------------------- -[[Spring-UsingSpringXML]] -Using Spring XML -^^^^^^^^^^^^^^^^ +### Using Spring XML You can use Spring 2.0 XML configuration to specify your link:xml-configuration.html[Xml Configuration] for link:routes.html[Routes] such as in the following http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/routingUsingCamelContextFactory.xml[example]. -[[Spring-ConfiguringComponentsandEndpoints]] -Configuring Components and Endpoints -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +### Configuring Components and Endpoints You can configure your link:component.html[Component] or link:endpoint.html[Endpoint] instances in your link:spring.html[Spring] @@ -380,9 +354,7 @@ link:uris.html[URIs]. For more detail see link:how-do-i-configure-endpoints.html[Configuring Endpoints and Components]. -[[Spring-CamelContextAware]] -CamelContextAware -^^^^^^^^^^^^^^^^^ +### CamelContextAware If you want to be injected with the link:camelcontext.html[CamelContext] in your POJO just implement the @@ -391,17 +363,13 @@ interface]; then when Spring creates your POJO the CamelContext will be injected into your POJO. Also see the link:bean-integration.html[Bean Integration] for further injections. -[[Spring-IntegrationTesting]] -Integration Testing -~~~~~~~~~~~~~~~~~~~ +### Integration Testing To avoid a hung route when testing using Spring Transactions see the note about Spring Integration Testing under link:transactional-client.html[Transactional Client]. -[[Spring-Seealso]] -See also -^^^^^^^^ +### See also * link:tutorial-jmsremoting.html[Spring JMS Tutorial] * link:creating-a-new-spring-based-camel-route.html[Creating a new http://git-wip-us.apache.org/repos/asf/camel/blob/96ee3140/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc ---------------------------------------------------------------------- diff --git a/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc b/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc index 44b93f9..a1dc3e2 100644 --- a/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc +++ b/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc @@ -1,10 +1,8 @@ -[[BlueprintTesting-BlueprintTesting]] -Blueprint Testing -~~~~~~~~~~~~~~~~~ +## Blueprint Testing *Available as of Camel 2.10* -INFO:*camel-test-blueprint* does only support testing _one_ CamelContext. So +camel-test-blueprint does only support testing _one_ CamelContext. So if you have two or more CamelContexts in your blueprint XML files, then only the CamelContext first found is used during testing. @@ -43,9 +41,7 @@ pom: </dependency> ----------------------------------------------- -[[BlueprintTesting-Classpathscanning]] -Classpath scanning -^^^^^^^^^^^^^^^^^^ +### Classpath scanning By default PojoSR test container scans the test classpath for all the OSGi bundles available there. All the bundles with Blueprint descriptor @@ -68,9 +64,7 @@ getBlueprintDescriptor method will not prevent the test container from loading a given descriptor. The `getBundleFilter` method is the proper way of filtering out bundles you don't want to start during the test. -[[BlueprintTesting-SettingtimeoutwhengettingCamelContext]] -Setting timeout when getting CamelContext -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Setting timeout when getting CamelContext *Available as of Camel 2.13.0/2.12.1/2.11.2* @@ -83,9 +77,7 @@ property. * Locally for each test, by overriding _getCamelContextCreationTimeout_ method. -[[BlueprintTesting-Addingservicesonstartup]] -Adding services on startup -^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Adding services on startup *Available as of Camel 2.11.2/2.12.0*