http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc b/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc index 83677bc..8163c28 100644 --- a/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc +++ b/components/camel-google-calendar/src/main/docs/google-calendar-component.adoc @@ -1,10 +1,8 @@ -# Google Calendar Component +## Google Calendar Component *Available as of Camel 2.15* -[[GoogleCalendar-ComponentDescription]] -Component Description -^^^^^^^^^^^^^^^^^^^^^ +### Component Description The Google Calendar component provides access to http://google.com/calendar[Google Calendar] via @@ -33,9 +31,7 @@ for this component: ---------------------------------------------------------- -[[GoogleCalendar-options]] -1. Google Calendar Options -^^^^^^^^^^^^^^^^^^^^^^^^^^ +### 1. Google Calendar Options @@ -90,9 +86,7 @@ The Google Calendar component supports 16 endpoint options which are listed belo // endpoint options: END -[[GoogleCalendar-URIFormat]] -URI Format -^^^^^^^^^^ +### URI Format The GoogleCalendar Component uses the following URI format: @@ -112,9 +106,7 @@ Endpoint prefix can be one of: * list * settings -[[GoogleCalendar-ProducerEndpoints]] -Producer Endpoints -^^^^^^^^^^^^^^^^^^ +### Producer Endpoints Producer endpoints can use endpoint prefixes followed by endpoint names and associated options described next. A shorthand alias can be used for @@ -133,9 +125,7 @@ overrides message header, i.e. the endpoint option `inBody=option` would override a `CamelGoogleCalendar.option` header. -[[GoogleCalendar-ConsumerEndpoints]] -Consumer Endpoints -^^^^^^^^^^^^^^^^^^ +### Consumer Endpoints Any of the producer endpoints can be used as a consumer endpoint. Consumer endpoints can use @@ -145,19 +135,15 @@ invocation. Consumer endpoints that return an array or collection will generate one exchange per element, and their routes will be executed once for each exchange. -[[GoogleCalendar-MessageHeaders]] -Message Headers -^^^^^^^^^^^^^^^ +### Message Headers Any URI option can be provided in a message header for producer endpoints with a `CamelGoogleCalendar.` prefix. -[[GoogleCalendar-MessageBody]] -Message Body -^^^^^^^^^^^^ +### Message Body All result message bodies utilize objects provided by the underlying APIs used by the GoogleCalendarComponent. Producer endpoints can specify the option name for incoming message body in the `inBody` endpoint URI parameter. For endpoints that return an array or collection, a consumer -endpoint will map every element to distinct messages.    +endpoint will map every element to distinct messages.    \ No newline at end of file
http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-google-drive/src/main/docs/google-drive-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-google-drive/src/main/docs/google-drive-component.adoc b/components/camel-google-drive/src/main/docs/google-drive-component.adoc index 39457d7..10feb33 100644 --- a/components/camel-google-drive/src/main/docs/google-drive-component.adoc +++ b/components/camel-google-drive/src/main/docs/google-drive-component.adoc @@ -1,4 +1,4 @@ -# Google Drive Component +## Google Drive Component *Available as of Camel 2.14* @@ -28,9 +28,7 @@ for this component: ------------------------------------------------------- -[[GoogleDrive-URIFormat]] -URI Format -^^^^^^^^^^ +### URI Format ''''' @@ -57,9 +55,7 @@ Endpoint prefix can be one of: * drive-replies * drive-revisions -[[GoogleDrive-GoogleDriveComponent.1]] -GoogleDriveComponent -^^^^^^^^^^^^^^^^^^^^ +### GoogleDriveComponent @@ -114,9 +110,7 @@ The Google Drive component supports 14 endpoint options which are listed below: -[[GoogleDrive-ProducerEndpoints]] -Producer Endpoints -^^^^^^^^^^^^^^^^^^ +### Producer Endpoints Producer endpoints can use endpoint prefixes followed by endpoint names and associated options described next. A shorthand alias can be used for @@ -137,9 +131,7 @@ override a `CamelGoogleDrive.option` header. For more information on the endpoints and options see API documentation at: https://developers.google.com/drive/v2/reference/[https://developers.google.com/drive/v2/reference/] -[[GoogleDrive-ConsumerEndpoints]] -Consumer Endpoints -^^^^^^^^^^^^^^^^^^ +### Consumer Endpoints Any of the producer endpoints can be used as a consumer endpoint. Consumer endpoints can use @@ -149,19 +141,15 @@ invocation. Consumer endpoints that return an array or collection will generate one exchange per element, and their routes will be executed once for each exchange. -[[GoogleDrive-MessageHeaders]] -Message Headers -^^^^^^^^^^^^^^^ +### Message Headers Any URI option can be provided in a message header for producer endpoints with a `CamelGoogleDrive.` prefix. -[[GoogleDrive-MessageBody]] -Message Body -^^^^^^^^^^^^ +### Message Body All result message bodies utilize objects provided by the underlying APIs used by the GoogleDriveComponent. Producer endpoints can specify the option name for incoming message body in the `inBody` endpoint URI parameter. For endpoints that return an array or collection, a consumer -endpoint will map every element to distinct messages.    +endpoint will map every element to distinct messages.    \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-google-mail/src/main/docs/google-mail-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-google-mail/src/main/docs/google-mail-component.adoc b/components/camel-google-mail/src/main/docs/google-mail-component.adoc index 293b216..c39f83d 100644 --- a/components/camel-google-mail/src/main/docs/google-mail-component.adoc +++ b/components/camel-google-mail/src/main/docs/google-mail-component.adoc @@ -1,10 +1,8 @@ -# Google Mail Component +## Google Mail Component *Available as of Camel 2.15* -[[GoogleMail-ComponentDescription]] -Component Description -^^^^^^^^^^^^^^^^^^^^^ +### Component Description The Google Mail component provides access to http://gmail.com/[Gmail] via @@ -33,9 +31,7 @@ for this component: ------------------------------------------------------ -[[GoogleMail-URIFormat]] -URI Format -^^^^^^^^^^ +### URI Format The GoogleMail Component uses the following URI format: @@ -54,9 +50,7 @@ Endpoint prefix can be one of: * threads * users -[[GoogleMail-GoogleMailComponent.1]] -GoogleMailComponent -^^^^^^^^^^^^^^^^^^^ +### GoogleMailComponent @@ -109,9 +103,7 @@ The Google Mail component supports 13 endpoint options which are listed below: -[[GoogleMail-ProducerEndpoints]] -Producer Endpoints -^^^^^^^^^^^^^^^^^^ +### Producer Endpoints Producer endpoints can use endpoint prefixes followed by endpoint names and associated options described next. A shorthand alias can be used for @@ -132,9 +124,7 @@ override a `CamelGoogleMail.option` header. For more information on the endpoints and options see API documentation at: https://developers.google.com/gmail/api/v1/reference/[https://developers.google.com/gmail/api/v1/reference/] -[[GoogleMail-ConsumerEndpoints]] -Consumer Endpoints -^^^^^^^^^^^^^^^^^^ +### Consumer Endpoints Any of the producer endpoints can be used as a consumer endpoint. Consumer endpoints can use @@ -144,19 +134,15 @@ invocation. Consumer endpoints that return an array or collection will generate one exchange per element, and their routes will be executed once for each exchange. -[[GoogleMail-MessageHeaders]] -Message Headers -^^^^^^^^^^^^^^^ +### Message Headers Any URI option can be provided in a message header for producer endpoints with a `CamelGoogleMail.` prefix. -[[GoogleMail-MessageBody]] -Message Body -^^^^^^^^^^^^ +### Message Body All result message bodies utilize objects provided by the underlying APIs used by the GoogleMailComponent. Producer endpoints can specify the option name for incoming message body in the `inBody` endpoint URI parameter. For endpoints that return an array or collection, a consumer -endpoint will map every element to distinct messages.    +endpoint will map every element to distinct messages.    \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc b/components/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc index ddba59e..cdbb8f4 100644 --- a/components/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc +++ b/components/camel-google-pubsub/src/main/docs/google-pubsub-component.adoc @@ -1,10 +1,8 @@ -# Google Pubsub Component +## Google Pubsub Component *Available as of Camel 2.19* -[[GooglePubsub-ComponentDescription]] -Component Description -^^^^^^^^^^^^^^^^^^^^^ +### Component Description The Google Pubsub component provides access to https://cloud.google.com/pubsub/[Cloud Pub/Sub Infrastructure] via @@ -44,9 +42,7 @@ https://developers.google.com/identity/protocols/application-default-credentials Service Account Email and Service Account Key can be found in the GCP JSON credentials file as client_email and private_key respectively. -[[GooglePubsub-URIFormat]] -URI Format -^^^^^^^^^ +### URI Format The GoogleMail Component uses the following URI format: @@ -56,9 +52,7 @@ The GoogleMail Component uses the following URI format: Destination Name can be either a topic or a subscription name. -[[GooglePubsub-GooglePubsubComponent]] -GooglePubsubComponent -^^^^^^^^^^^^^^^^^^ +### GooglePubsubComponent // component options: START The Google Pubsub component supports 1 options which are listed below. @@ -96,9 +90,7 @@ The Google Pubsub component supports 11 endpoint options which are listed below: {% endraw %} // endpoint options: END -[[GooglePubsub-ProducerEndpoints]] -Producer Endpoints -^^^^^^^^^^^^^^^^^^ +### Producer Endpoints Producer endpoints can accept and deliver to PubSub individual and grouped exchanges alike. Grouped exchanges have `Exchange.GROUPED_EXCHANGE` property set. @@ -113,9 +105,7 @@ A Map set as message header `GooglePubsubConstants.ATTRIBUTES` will be sent as P Once exchange has been delivered to PubSub the PubSub Message ID will be assigned to the header `GooglePubsubConstants.MESSAGE_ID`. -[[GooglePubsub-ConsumerEndpoints]] -Consumer Endpoints -^^^^^^^^^^^^^^^^^^ +### Consumer Endpoints Google PubSub will redeliver the message if it has not been acknowledged within the time period set as a configuration option on the subscription. @@ -128,9 +118,7 @@ To ack/nack the message the component uses Acknowledgement ID stored as header ` If the header is removed or tampered with, the ack will fail and the message will be redelivered again after the ack deadline. -[[GooglePubsub-MessageHeaders]] -Message Headers -^^^^^^^^^^^^ +### Message Headers Headers set by the consumer endpoints: * GooglePubsubConstants.MESSAGE_ID @@ -138,16 +126,12 @@ Headers set by the consumer endpoints: * GooglePubsubConstants.PUBLISH_TIME * GooglePubsubConstants.ACK_ID -[[GooglePubsub-MessageBody]] -Message Body -^^^^^^^^^^^^ +### Message Body The consumer endpoint returns the content of the message as byte[] - exactly as the underlying system sends it. It is up for the route to convert/unmarshall the contents. -[[GooglePubsub-RollbackRedelivery]] -Rollback and Redelivery -^^^^^^^^^^^^ +### Rollback and Redelivery The rollback for Google PubSub relies on the idea of the Acknowledgement Deadline - the time period where Google PubSub expects to receive the acknowledgement. If the acknowledgement has not been received, the message is redelivered. @@ -164,4 +148,4 @@ setting the message header * GooglePubsubConstants.ACK_DEADLINE -to the value in seconds. +to the value in seconds. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-gora/src/main/docs/gora-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-gora/src/main/docs/gora-component.adoc b/components/camel-gora/src/main/docs/gora-component.adoc index 7913685..f09fbb8 100644 --- a/components/camel-gora/src/main/docs/gora-component.adoc +++ b/components/camel-gora/src/main/docs/gora-component.adoc @@ -1,4 +1,4 @@ -# Gora Component +## Gora Component *Camel-Gora* is an http://camel.apache.org/[Apache Camel] component that allows you to work with NoSQL databases using the @@ -19,9 +19,7 @@ for this component: </dependency> --------------------------------------------------------- -[[Gora-ApacheGoraOverview]] -Apache Gora Overview -~~~~~~~~~~~~~~~~~~~~ +### Apache Gora Overview The http://gora.apache.org/[Apache Gora] open source framework provides an in-memory data model and persistence for big data. Gora supports @@ -39,9 +37,7 @@ http://accumulo.apache.org/[Apache Accumulo], http://aws.amazon.com/dynamodb/[Amazon DynamoDB] and SQL databases such as http://hsqldb.org/[hsqldb], http://www.mysql.com/[MySQL] and more. -[[Gora-URIformat]] -URI format -~~~~~~~~~~ +### URI format [source,text] --------------------------- @@ -64,9 +60,7 @@ _Java DSL_ to("gora:foobar?keyClass=java.lang.Long&valueClass=org.apache.camel.component.gora.generated.Pageview&dataStoreClass=org.apache.gora.hbase.store.HBaseStore") ------------------------------------------------------------------------------------------------------------------------------------------------------------- -[[Gora-Configuratiion]] -Configuratiion -~~~~~~~~~~~~~~ +### Configuratiion Using camel-gora needs some configuration. This mainly involve to configure the _AvroStore_ through the _gora.properties_ file and to @@ -77,9 +71,7 @@ Extensive information for this configuration can be found in the apache http://gora.apache.org/current/index.html[gora documentation] and the http://gora.apache.org/current/gora-conf.html[gora-conf] page. -[[Gora-Options]] -Options -~~~~~~~ +### Options // component options: START @@ -126,9 +118,7 @@ The Gora component supports 22 endpoint options which are listed below: -[[Gora-SupportedGoraOperations]] -Supported Gora Operations -~~~~~~~~~~~~~~~~~~~~~~~~~ +### Supported Gora Operations Supported operations include : *put*, *get*, *delete*, *getSchemaName*, *deleteSchema*, *createSchema*, *query*, *deleteByQuery*, @@ -166,9 +156,7 @@ hold the objects._ datastore._ |======================================================================= -[[Gora-GoraHeaders]] -Gora Headers -^^^^^^^^^^^^ +### Gora Headers [width="100%",cols="20%,80%",options="header",] |======================================================================= @@ -179,9 +167,7 @@ Gora Headers |GoraKey | _Used in order to define the datum key for the operations need it._ |======================================================================= -[[Gora-Usageexamples]] -Usage examples -^^^^^^^^^^^^^^ +### Usage examples *Create Schema* _(XML DSL)_: @@ -253,11 +239,9 @@ The full usage examples in the form of integration tests can be found at https://github.com/ipolyzos/camel-gora-examples/[camel-gora-examples] repository. -[[Gora-Moreresources]] -More resources -^^^^^^^^^^^^^^ +### More resources For more please information and in depth configuration refer to the http://gora.apache.org/current/overview.html[Apache Gora Documentation] and the http://gora.apache.org/current/tutorial.html[Apache Gora -Tutorial]. +Tutorial]. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-grape/src/main/docs/grape-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-grape/src/main/docs/grape-component.adoc b/components/camel-grape/src/main/docs/grape-component.adoc index 02b2b34..4cddf27 100644 --- a/components/camel-grape/src/main/docs/grape-component.adoc +++ b/components/camel-grape/src/main/docs/grape-component.adoc @@ -1,4 +1,4 @@ -# Grape Component +## Grape Component Available as of Camel 2.16 @@ -9,9 +9,7 @@ can add new components, data formats and beans to your `CamelContext` without the restart of the router. -[[Grape-Options]] -Grape options -^^^^^^^^^^^^^ +### Grape options // component options: START The Grape component has no options. @@ -34,9 +32,7 @@ The Grape component supports 3 endpoint options which are listed below: -[[Grape-Settingupclassloader]] -Setting up class loader -^^^^^^^^^^^^^^^^^^^^^^^ +### Setting up class loader Grape requires using Groovy class loader with the `CamelContext`. You can enable Groovy class loading on the existing Camel Context using the @@ -57,9 +53,7 @@ yourself: camelContext.setApplicationContextClassLoader(new GroovyClassLoader(myClassLoader)); ------------------------------------------------------------------------------------ -[[Grape-URIformat]] -URI format -^^^^^^^^^^ +### URI format Grape component supports only producer endpoints. @@ -86,9 +80,7 @@ from("direct:loadCamelFTP"). to("grape:defaultMavenCoordinates"); ---------------------------------------------------------- -[[Grape-AddingtheGrapecomponenttotheproject]] -Adding the Grape component to the project -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Adding the Grape component to the project Maven users will need to add the following dependency to their `pom.xml` for this component: @@ -103,9 +95,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[Grape-Defaultpayloadtype]] -Default payload type -^^^^^^^^^^^^^^^^^^^^ +### Default payload type By default Camel Grape component operates on the String payloads: @@ -126,9 +116,7 @@ String: producerTemplate.sendBody("grape:defaultMavenCoordinates", "org.apache.camel/camel-ftp/2.15.2".getBytes()); ----------------------------------------------------------------------------------------------------------- -[[Grape-Headers]] -Headers -^^^^^^^ +### Headers The following headers are recognized by the Grape component: @@ -139,9 +127,7 @@ The following headers are recognized by the Grape component: |`CamelGrapeCommand` |`GrapeConstants.GRAPE_COMMAND` |Producer |`org.apache.camel.component.grape.GrapeCommand` |The command to be performed by the Grape endpoint. Default to `grab`. |======================================================================= -[[Grape-Loadingcomponentsatruntime]] -Loading components at runtime -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Loading components at runtime In order to load the new component at the router runtime, just grab the jar containing the given component: @@ -153,9 +139,7 @@ template.sendBody("grape:grape", "org.apache.camel/camel-stream/2.15.2"); template.sendBody("stream:out", "msg"); ------------------------------------------------------------------------- -[[Grape-Loadingprocessorsbeanatruntime]] -Loading processors bean at runtime -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Loading processors bean at runtime In order to load the new processor bean  with your custom business login at the router runtime, just grab the jar containing the required bean: @@ -170,9 +154,7 @@ int price = template.requestBody("bean:com.example.PricingBean?method=currentPro  -[[Grape-LoadingdeployedjarsafterCamelcontextrestart]] -Loading deployed jars after Camel context restart -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Loading deployed jars after Camel context restart After you download new jar, you usually would like to have it loaded by the Camel again after the restart of the `CamelContext`. It is certainly @@ -201,9 +183,7 @@ camelContext.addRoutes(  -[[Grape-Managingtheinstalledjars]] -Managing the installed jars -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Managing the installed jars If you would like to check what jars have been installed into the given `CamelContext`, send message to the grape endpoint with @@ -237,12 +217,9 @@ command: setBody().constant("Installed patches have been deleted."); ----------------------------------------------------------------------------------------- -[[Grape-SeeAlso]] -See Also -^^^^^^^^ +### See Also * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] -* link:getting-started.html[Getting Started] - +* link:getting-started.html[Getting Started] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-groovy/src/main/docs/groovy-language.adoc ---------------------------------------------------------------------- diff --git a/components/camel-groovy/src/main/docs/groovy-language.adoc b/components/camel-groovy/src/main/docs/groovy-language.adoc index 1eca86d..58edbd6 100644 --- a/components/camel-groovy/src/main/docs/groovy-language.adoc +++ b/components/camel-groovy/src/main/docs/groovy-language.adoc @@ -1,4 +1,4 @@ -# Groovy Language +## Groovy Language Camel supports http://groovy.codehaus.org/[Groovy] among other link:scripting-languages.html[Scripting Languages] to allow an @@ -18,9 +18,7 @@ link:predicate.html[Predicate] in a link:message-filter.html[Message Filter] or as an link:expression.html[Expression] for a link:recipient-list.html[Recipient List] -[[Groovy-Options]] -Groovy Options -^^^^^^^^^^^^^^ +### Groovy Options @@ -40,9 +38,7 @@ The Groovy language supports 1 options which are listed below. -[[Groovy-CustomizingGroovyShell]] -Customizing Groovy Shell -^^^^^^^^^^^^^^^^^^^^^^^^ +### Customizing Groovy Shell Sometimes you may need to use custom `GroovyShell` instance in your Groovy expressions. To provide custom `GroovyShell`, add implementation @@ -68,9 +64,7 @@ public class CustomGroovyShellFactory implements GroovyShellFactory { ...Camel will use your custom GroovyShell instance (containing your custom static imports), instead of the default one. -[[Groovy-Example]] -Example -^^^^^^^ +### Example [source,java] ------------------------------------------------------------------------------------------------ @@ -91,9 +85,7 @@ And the Spring DSL: </route> ----------------------------------------------------------------------------- -[[Groovy-ScriptContext]] -ScriptContext -^^^^^^^^^^^^^ +### ScriptContext The JSR-223 scripting languages ScriptContext is pre configured with the following attributes all set at `ENGINE_SCOPE`: @@ -121,9 +113,7 @@ further below for example. See link:scripting-languages.html[Scripting Languages] for the list of languages with explicit DSL support. -[[Groovy-AdditionalargumentstoScriptingEngine]] -Additional arguments to ScriptingEngine -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Additional arguments to ScriptingEngine *Available as of Camel 2.8* @@ -131,9 +121,7 @@ You can provide additional arguments to the `ScriptingEngine` using a header on the Camel message with the key `CamelScriptArguments`. + See this example: -[[Groovy-Usingpropertiesfunction]] -Using properties function -^^^^^^^^^^^^^^^^^^^^^^^^^ +### Using properties function *Available as of Camel 2.9* @@ -156,9 +144,7 @@ same example is simpler: .setHeader("myHeader").groovy("properties.resolve(request.headers.get('foo'))") --------------------------------------------------------------------------------------- -[[Groovy-Loadingscriptfromexternalresource]] -Loading script from external resource -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Loading script from external resource *Available as of Camel 2.11* @@ -172,9 +158,7 @@ eg to refer to a file on the classpath you can do: .setHeader("myHeader").groovy("resource:classpath:mygroovy.groovy") ------------------------------------------------------------------- -[[Groovy-Howtogettheresultfrommultiplestatementsscript]] -How to get the result from multiple statements script -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### How to get the result from multiple statements script *Available as of Camel 2.14* @@ -192,9 +176,7 @@ bar = "baz"; result = body * 2 + 1 ------------------------------------------------------------- -[[Groovy-Dependencies]] -Dependencies -^^^^^^^^^^^^ +### Dependencies To use scripting languages in your camel routes you need to add the a dependency on *camel-script* which integrates the JSR-223 scripting @@ -211,4 +193,4 @@ link:download.html[the download page for the latest versions]). <artifactId>camel-script</artifactId> <version>x.x.x</version> </dependency> ---------------------------------------- +--------------------------------------- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-gson/src/main/docs/json-gson-dataformat.adoc ---------------------------------------------------------------------- diff --git a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc index aabde3c..c0df1e6 100644 --- a/components/camel-gson/src/main/docs/json-gson-dataformat.adoc +++ b/components/camel-gson/src/main/docs/json-gson-dataformat.adoc @@ -1,4 +1,4 @@ -# JSon GSon DataFormat +## JSon GSon DataFormat *Available as of Camel 2.18* @@ -12,9 +12,7 @@ from("activemq:My.Queue"). to("mqseries:Another.Queue"); ------------------------------- -[[Gson-Options]] -Gson Options -^^^^^^^^^^^^ +### Gson Options // dataformat options: START @@ -49,9 +47,7 @@ The JSon GSon dataformat supports 17 options which are listed below. -[[Gson-Dependencies]] -Dependencies -^^^^^^^^^^^^ +### Dependencies To use Gson in your camel routes you need to add the dependency on *camel-gson* which implements this data format. @@ -68,4 +64,4 @@ link:download.html[the download page for the latest versions]). <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> ----------------------------------------------------------- +---------------------------------------------------------- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc b/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc index f796008..879c8c9 100644 --- a/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc +++ b/components/camel-guava-eventbus/src/main/docs/guava-eventbus-component.adoc @@ -1,4 +1,4 @@ -# Guava EventBus Component +## Guava EventBus Component *Available since Camel 2.10.0* @@ -27,9 +27,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[GuavaEventBus-URIformat]] -URI format -^^^^^^^^^^ +### URI format [source,java] -------------------------------- @@ -40,9 +38,7 @@ Where *busName* represents the name of the `com.google.common.eventbus.EventBus` instance located in the Camel registry. -[[GuavaEventBus-Options]] -Options -^^^^^^^ +### Options @@ -87,9 +83,7 @@ The Guava EventBus component supports 7 endpoint options which are listed below: -[[GuavaEventBus-Usage]] -Usage -^^^^^ +### Usage Using `guava-eventbus` component on the consumer side of the route will capture messages sent to the Guava `EventBus` and forward them to the @@ -131,9 +125,7 @@ eventBus.register(new Object(){ }); ---------------------------------------------------------------------- -[[GuavaEventBus-DeadEventconsiderations]] -DeadEvent considerations -^^^^^^^^^^^^^^^^^^^^^^^^ +### DeadEvent considerations Keep in mind that due to the limitations caused by the design of the Guava EventBus, you cannot specify event class to be received by the @@ -182,9 +174,7 @@ follows. from("guava-eventbus:busName?listenerInterface=com.example.CustomListener").to("seda:queue"); --------------------------------------------------------------------------------------------- -[[GuavaEventBus-Consumingmultipletypeofevents]] -Consuming multiple type of events -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Consuming multiple type of events In order to define multiple type of events to be consumed by Guava EventBus consumer use `listenerInterface` endpoint option, as listener @@ -212,4 +202,4 @@ follows. [source,java] ----------------------------------------------------------------------------------------------------- from("guava-eventbus:busName?listenerInterface=com.example.MultipleEventsListener").to("seda:queue"); ------------------------------------------------------------------------------------------------------ +----------------------------------------------------------------------------------------------------- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hazelcast/src/main/docs/hazelcast-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hazelcast/src/main/docs/hazelcast-component.adoc b/components/camel-hazelcast/src/main/docs/hazelcast-component.adoc index b042205..4873afa 100644 --- a/components/camel-hazelcast/src/main/docs/hazelcast-component.adoc +++ b/components/camel-hazelcast/src/main/docs/hazelcast-component.adoc @@ -1,4 +1,4 @@ -# Hazelcast Component +## Hazelcast Component *Available as of Camel 2.7* @@ -28,9 +28,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[HazelcastComponent-URIformat]] -URI format -^^^^^^^^^^ +### URI format [source,java] ------------------------------------------------------------------------------------------------------------------------- @@ -42,9 +40,7 @@ hazelcast:[ map | multimap | queue | topic | seda | set | atomicvalue | instance * RingBuffer support is available as of Camel 2.16. * -[[HazelcastComponent-Options]] -Options -^^^^^^^ +### Options @@ -94,9 +90,7 @@ The Hazelcast component supports 13 endpoint options which are listed below: -[[HazelcastComponent-Sections]] -Sections -^^^^^^^^ +### Sections 1. Usage of link:hazelcast-component.html[#map] 2. Usage of link:hazelcast-component.html[#multimap] @@ -109,13 +103,9 @@ Sections 9. Usage of link:hazelcast-component.html[#replicatedmap] 10. Usage of link:hazelcast-component.html[#ringbuffer] -[[HazelcastComponent-UsageofMap]] -Usage of Map -^^^^^^^^^^^^ +### Usage of Map -[[HazelcastComponent-mapcacheproducer-to-map]] -Map cache producer - to("hazelcast:map:foo") -++++++++++++++++++++++++++++++++++++++++++++ +#### Map cache producer - to("hazelcast:map:foo") If you want to store a value in a map you can use the map cache producer. @@ -343,9 +333,7 @@ String q1 = "bar > 1000"; template.sendBodyAndHeader("direct:query", null, HazelcastConstants.QUERY, q1); ------------------------------------------------------------------------------- -[[HazelcastComponent-mapcacheconsumer-from-map]] -Map cache consumer - from("hazelcast:map:foo") -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Map cache consumer - from("hazelcast:map:foo") Hazelcast provides event listeners on their data grid. If you want to be notified if a cache will be manipulated, you can use the map consumer. @@ -399,13 +387,9 @@ fromF("hazelcast:%sfoo", HazelcastConstants.MAP_PREFIX) .log("fail!"); -------------------------------------------------------------------------------------------- -[[HazelcastComponent-UsageofMultiMap]] -Usage of Multi Map -^^^^^^^^^^^^^^^^^^ +### Usage of Multi Map -[[HazelcastComponent-multimapcacheproducer-to-multimap]] -multimap cache producer - to("hazelcast:multimap:foo") -++++++++++++++++++++++++++++++++++++++++++++++++++++++ +#### multimap cache producer - to("hazelcast:multimap:foo") A multimap is a cache where you can store n values to one key. The multimap producer provides 4 operations (put, get, removevalue, delete). @@ -543,9 +527,7 @@ you can call them in your test class with: template.sendBodyAndHeader("direct:[put|get|removevalue|delete]", "my-foo", HazelcastConstants.OBJECT_ID, "4711"); ------------------------------------------------------------------------------------------------------------------ -[[HazelcastComponent-multimapcacheconsumer-from-multimap]] -multimap cache consumer - from("hazelcast:multimap:foo") -++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +#### multimap cache consumer - from("hazelcast:multimap:foo") For the multimap cache this component provides the same listeners / variables as for the map cache consumer (except the update and enviction @@ -589,13 +571,9 @@ Header Variables inside the response message: |`CamelHazelcastCacheType` |`String` |the type of the cache - here multimap |======================================================================= -[[HazelcastComponent-UsageofQueue]] -Usage of Queue -^^^^^^^^^^^^^^ +### Usage of Queue -[[HazelcastComponent-Queueproducer]] -Queue producer â to(âhazelcast:queue:fooâ) -++++++++++++++++++++++++++++++++++++++++++ +#### Queue producer â to(âhazelcast:queue:fooâ) The queue producer provides 6 operations (add, put, poll, peek, offer, removevalue). @@ -660,9 +638,7 @@ from("direct:removevalue") .toF("hazelcast:%sbar", HazelcastConstants.QUEUE_PREFIX); -------------------------------------------------------------------------------------------- -[[HazelcastComponent-Queueconsumer]] -Queue consumer â from(âhazelcast:queue:fooâ) -++++++++++++++++++++++++++++++++++++++++++++ +#### Queue consumer â from(âhazelcast:queue:fooâ) The queue consumer provides 2 operations (add, remove). @@ -683,13 +659,9 @@ fromF("hazelcast:%smm", HazelcastConstants.QUEUE_PREFIX) [[HazelcastComponent-topic]] -[[HazelcastComponent-UsageofTopic]] -Usage of Topic -^^^^^^^^^^^^^^ +### Usage of Topic -[[HazelcastComponent-Topicproducer]] -Topic producer â to(âhazelcast:topic:fooâ) -++++++++++++++++++++++++++++++++++++++++++ +#### Topic producer â to(âhazelcast:topic:fooâ) The topic producer provides only one operation (publish). @@ -703,9 +675,7 @@ from("direct:add") .toF("hazelcast:%sbar", HazelcastConstants.PUBLISH_OPERATION); ---------------------------------------------------------------------------------------- -[[HazelcastComponent-Topicconsumer]] -Topic consumer â from(âhazelcast:topic:fooâ) -++++++++++++++++++++++++++++++++++++++++++++ +#### Topic consumer â from(âhazelcast:topic:fooâ) The topic consumer provides only one operation (received). This component is supposed to support multiple consumption as it's expected @@ -724,13 +694,9 @@ fromF("hazelcast:%sfoo", HazelcastConstants.TOPIC_PREFIX)  -[[HazelcastComponent-UsageofList]] -Usage of List -^^^^^^^^^^^^^ +### Usage of List -[[HazelcastComponent-Listproducer]] -List producer â to(âhazelcast:list:fooâ) -++++++++++++++++++++++++++++++++++++++++ +#### List producer â to(âhazelcast:list:fooâ) The list producer provides 4 operations (add, addAll, set, get, removevalue, removeAll, clear). @@ -779,9 +745,7 @@ from("direct:removevalue") Note that *CamelHazelcastObjectIndex* header is used for indexing purpose. -[[HazelcastComponent-Thelistconsumerprovides2operationsListconsumer]] -The list consumer provides 2 operations (add, remove).List consumer â from(âhazelcast:list:fooâ) -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +#### The list consumer provides 2 operations (add, remove).List consumer â from(âhazelcast:list:fooâ) [source,java] ----------------------------------------------------------------------------------------------- @@ -798,17 +762,13 @@ fromF("hazelcast:%smm", HazelcastConstants.LIST_PREFIX) .log("fail!"); ----------------------------------------------------------------------------------------------- -[[HazelcastComponent-UsageofSEDA]] -Usage of SEDA -^^^^^^^^^^^^^ +### Usage of SEDA SEDA component differs from the rest components provided. It implements a work-queue in order to support asynchronous SEDA architectures, similar to the core "SEDA" component. -[[HazelcastComponent-SEDAproducer]] -SEDA producer â to(âhazelcast:seda:fooâ) -++++++++++++++++++++++++++++++++++++++++ +#### SEDA producer â to(âhazelcast:seda:fooâ) The SEDA producer provides no operations. You only send data to the specified queue. @@ -839,9 +799,7 @@ Spring DSL : </route> ---------------------------------- -[[HazelcastComponent-SEDAconsumer]] -SEDA consumer â from(âhazelcast:seda:fooâ) -++++++++++++++++++++++++++++++++++++++++++ +#### SEDA consumer â from(âhazelcast:seda:fooâ) The SEDA consumer provides no operations. You only retrieve data from the specified queue. @@ -889,15 +847,11 @@ Spring DSL: </route> ----------------------------------- -[[HazelcastComponent-UsageofAtomicNumber]] -Usage of Atomic Number -^^^^^^^^^^^^^^^^^^^^^^ +### Usage of Atomic Number * There is no consumer for this endpoint! * -[[HazelcastComponent-atomicnumberproducer]] -atomic number producer - to("hazelcast:atomicnumber:foo") -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +#### atomic number producer - to("hazelcast:atomicnumber:foo") An atomic number is an object that simply provides a grid wide number (long). The operations for this producer are setvalue (set the number @@ -1054,15 +1008,11 @@ Spring DSL: </route> ----------------------------------------------------------------------------------------------- -[[HazelcastComponent-clustersupport]] -cluster support -^^^^^^^^^^^^^^^ +### cluster support * This endpoint provides no producer! * -[[HazelcastComponent-instanceconsumer-from]] -instance consumer - from("hazelcast:instance:foo") -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### instance consumer - from("hazelcast:instance:foo") Hazelcast makes sense in one single "server node", but it's extremly powerful in a clustered environment. The instance consumer fires if a @@ -1103,13 +1053,9 @@ Header Variables inside the response message: |`CamelHazelcastInstancePort` |`Integer` |port number of the instance |======================================================================= -[[HazelcastComponent-Usinghazelcastreference]] -Using hazelcast reference -^^^^^^^^^^^^^^^^^^^^^^^^^ +### Using hazelcast reference -[[HazelcastComponent-Byitsname]] -By its name -+++++++++++ +#### By its name [source,xml] -------------------------------------------------------------------------------------------------------- @@ -1144,9 +1090,7 @@ By its name </camelContext> -------------------------------------------------------------------------------------------------------- -[[HazelcastComponent-Byinstance]] -By instance -+++++++++++ +#### By instance [source,xml] ------------------------------------------------------------------------------ @@ -1176,18 +1120,14 @@ By instance </camelContext> ------------------------------------------------------------------------------ -[[HazelcastComponent-PublishinghazelcastinstanceasanOSGIservice]] -Publishing hazelcast instance as an OSGI service -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Publishing hazelcast instance as an OSGI service If operating in an OSGI container and you would want to use one instance of hazelcast across all bundles in the same container. You can publish the instance as an OSGI service and bundles using the cache al need is to reference the service in the hazelcast endpoint. -[[HazelcastComponent-BundleAcreateaninstanceandpublishesitasanOSGIservice]] -Bundle A create an instance and publishes it as an OSGI service -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +#### Bundle A create an instance and publishes it as an OSGI service  @@ -1205,9 +1145,7 @@ Bundle A create an instance and publishes it as an OSGI service <service ref="hazelcastInstance" interface="com.hazelcast.core.HazelcastInstance" /> -------------------------------------------------------------------------------------------------------- -[[HazelcastComponent-BundleBusestheinstance]] -Bundle B uses the instance -++++++++++++++++++++++++++ +#### Bundle B uses the instance [source,xml] -------------------------------------------------------------------------------------- @@ -1234,15 +1172,11 @@ Bundle B uses the instance </camelContext> -------------------------------------------------------------------------------------- -[[HazelcastComponent-UsageofReplicatedmap]] -Usage of Replicated map -^^^^^^^^^^^^^^^^^^^^^^^ +### Usage of Replicated map *Avalaible from Camel 2.16* -[[HazelcastComponent-replicatedmapcacheproducer]] -replicatedmap cache producer -++++++++++++++++++++++++++++ +#### replicatedmap cache producer A replicated map is a weakly consistent, distributed key-value data structure with no data partition. The replicatedmap producer provides 4 @@ -1349,9 +1283,7 @@ you can call them in your test class with: template.sendBodyAndHeader("direct:[put|get|delete|clear]", "my-foo", HazelcastConstants.OBJECT_ID, "4711"); ------------------------------------------------------------------------------------------------------------ -[[HazelcastComponent-replicatedmapcacheconsumer]] -replicatedmap cache consumer -++++++++++++++++++++++++++++ +#### replicatedmap cache consumer For the multimap cache this component provides the same listeners / variables as for the map cache consumer (except the update and enviction @@ -1395,15 +1327,11 @@ Header Variables inside the response message: |`CamelHazelcastCacheType` |`String` |the type of the cache - here replicatedmap |======================================================================= -[[HazelcastComponent-UsageofRingbuffer]] -Usage of Ringbuffer -^^^^^^^^^^^^^^^^^^^ +### Usage of Ringbuffer *Avalaible from Camel 2.16* -[[HazelcastComponent-ringbuffercacheproducer]] -ringbuffer cache producer -+++++++++++++++++++++++++ +#### ringbuffer cache producer Ringbuffer is a distributed data structure where the data is stored in a ring-like structure. You can think of it as a circular array with a @@ -1459,4 +1387,4 @@ from("direct:get") .setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.READ_ONCE_HEAD_OPERATION)) .toF("hazelcast:%sbar", HazelcastConstants.RINGBUFFER_PREFIX) .to("seda:out"); ------------------------------------------------------------------------------------------------ +----------------------------------------------------------------------------------------------- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hbase/src/main/docs/hbase-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hbase/src/main/docs/hbase-component.adoc b/components/camel-hbase/src/main/docs/hbase-component.adoc index e9caa6a..dfaa3ba 100644 --- a/components/camel-hbase/src/main/docs/hbase-component.adoc +++ b/components/camel-hbase/src/main/docs/hbase-component.adoc @@ -1,4 +1,4 @@ -# HBase Component +## HBase Component *Available as of Camel 2.10* @@ -18,9 +18,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[hbase-ApacheHBaseOverview]] -Apache HBase Overview -^^^^^^^^^^^^^^^^^^^^^ +### Apache HBase Overview HBase is an open-source, distributed, versioned, column-oriented store modeled after Google's Bigtable: A Distributed Storage System for @@ -28,9 +26,7 @@ Structured Data. You can use HBase when you need random, realtime read/write access to your Big Data. More information at http://hbase.apache.org[Apache HBase]. -[[hbase-CamelandHBase]] -Camel and HBase -^^^^^^^^^^^^^^^ +### Camel and HBase When using a datasotre inside a camel route, there is always the chalenge of specifying how the camel message will stored to the @@ -59,9 +55,7 @@ Regardless of the mapping strategy camel-hbase will convert a message into an org.apache.camel.component.hbase.model.HBaseData object and use that object for its internal operations. -[[hbase-Configuringthecomponent]] -Configuring the component -^^^^^^^^^^^^^^^^^^^^^^^^^ +### Configuring the component The HBase component can be provided a custom HBaseConfiguration object as a property or it can create an HBase configuration object on its own @@ -81,9 +75,7 @@ You can find more information about how to configure HBase clients at: http://archive.apache.org/dist/hbase/docs/client_dependencies.html[HBase client configuration and dependencies] -[[hbase-HBaseProducer]] -HBase Producer -^^^^^^^^^^^^^^ +### HBase Producer As mentioned above camel provides produers endpoints for HBase. This allows you to store, delete, retrieve or query data from HBase using @@ -103,9 +95,7 @@ The supported operations are: * Delete * Scan -[[hbase-SupportedURIoptions]] -Supported URI options -+++++++++++++++++++++ +#### Supported URI options @@ -160,9 +150,7 @@ The HBase component supports 17 endpoint options which are listed below: -[[hbase-PutOperations.]] -Put Operations. -+++++++++++++++ +#### Put Operations. HBase is a column based store, which allows you to store data into a specific column of a specific row. Columns are grouped into families, so @@ -226,9 +214,7 @@ headers or a combination of both. It is recommended to specify constants as part of the uri and dynamic values as headers. If something is defined both as header and as part of the uri, the header will be used. -[[hbase-GetOperations.]] -Get Operations. -+++++++++++++++ +#### Get Operations. A Get Operation is an operation that is used to retrieve one or more values from a specified HBase row. To specify what are the values that @@ -251,9 +237,7 @@ message headers. In the example above the result of the get operation will be stored as a header with name CamelHBaseValue. -[[hbase-DeleteOperations.]] -Delete Operations. -++++++++++++++++++ +#### Delete Operations. You can also you camel-hbase to perform HBase delete operation. The delete operation will remove an entire row. All that needs to be @@ -271,9 +255,7 @@ specified is one or more rows as part of the message headers. </route> ---------------------------------------------------------------- -[[hbase-ScanOperations.]] -Scan Operations. -++++++++++++++++ +#### Scan Operations. A scan operation is the equivalent of a query in HBase. You can use the scan operation to retrieve multiple rows. To specify what columns should @@ -354,9 +336,7 @@ and will pass that model the the ModelAwareColumnMatchingFilter. The filter will filter out any rows, that do not contain columns that match the model. It is like query by example. -[[hbase-HBaseConsumer]] -HBase Consumer -^^^^^^^^^^^^^^ +### HBase Consumer The Camel HBase Consumer, will perform repeated scan on the specified HBase table and will return the scan results as part of the message. You @@ -382,9 +362,7 @@ specified fields and the scan results will populate the model object with values. Finally the mapping strategy will be used to map this model to the camel message. -[[hbase-HBaseIdempotentrepository]] -HBase Idempotent repository -^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### HBase Idempotent repository The camel-hbase component also provides an idempotent repository which can be used when you want to make sure that each message is processed @@ -402,18 +380,14 @@ from("direct:in") .to("log:out); ------------------------------------------------------------------------------------------------------------------ -[[hbase-HBaseMapping]] -HBase Mapping -^^^^^^^^^^^^^ +### HBase Mapping It was mentioned above that you the default mapping strategies are *header* and *body* mapping. + Below you can find some detailed examples of how each mapping strategy works. -[[hbase-HBaseHeadermappingExamples]] -HBase Header mapping Examples -+++++++++++++++++++++++++++++ +#### HBase Header mapping Examples The header mapping is the default mapping. To put the value "myvalue" into HBase row "myrow" and column @@ -475,9 +449,7 @@ Please note that in order to avoid boilerplate headers that are considered constant for all messages, you can also specify them as part of the endpoint uri, as you will see below. -[[hbase-BodymappingExamples]] -Body mapping Examples -+++++++++++++++++++++ +#### Body mapping Examples In order to use the body mapping strategy you will have to specify the option mappingStrategy as part of the uri, for example: @@ -510,10 +482,7 @@ myvalue to the column myfamily:myqualifier. + advantage it has over the header mapping strategy is that the HBaseData object can be easily converted to or from xml/json. -[[hbase-Seealso]] -See also -^^^^^^^^ +### See also * link:polling-consumer.html[Polling Consumer] -* http://hbase.apache.org[Apache HBase] - +* http://hbase.apache.org[Apache HBase] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hdfs/src/main/docs/hdfs-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hdfs/src/main/docs/hdfs-component.adoc b/components/camel-hdfs/src/main/docs/hdfs-component.adoc index eb420d2..97170fb 100644 --- a/components/camel-hdfs/src/main/docs/hdfs-component.adoc +++ b/components/camel-hdfs/src/main/docs/hdfs-component.adoc @@ -1,4 +1,4 @@ -# HDFS Component +## HDFS Component *Available as of Camel 2.8* @@ -19,9 +19,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[HDFS-URIformat]] -URI format -^^^^^^^^^^ +### URI format [source,java] --------------------------------------- @@ -51,9 +49,7 @@ fileMode=Append to append each of the chunks together.  -[[HDFS-Options]] -Options -^^^^^^^ +### Options @@ -134,9 +130,7 @@ The HDFS component supports 41 endpoint options which are listed below: -[[HDFS-KeyTypeandValueType]] -KeyType and ValueType -+++++++++++++++++++++ +#### KeyType and ValueType * NULL it means that the key or the value is absent * BYTE for writing a byte, the java Byte class is mapped into a BYTE @@ -152,9 +146,7 @@ BYTES is also used with everything else, for example, in Camel a file is sent around as an InputStream, int this case is written in a sequence file or a map file as a sequence of bytes. -[[HDFS-SplittingStrategy]] -Splitting Strategy -^^^^^^^^^^^^^^^^^^ +### Splitting Strategy In the current version of Hadoop opening a file in append mode is disabled since it's not very reliable. So, for the moment, it's only @@ -197,15 +189,11 @@ than 1 second or if more than 5 bytes have been written. So, running `hadoop fs -ls /tmp/simple-file` you'll see that multiple files have been created. -[[HDFS-MessageHeaders]] -Message Headers -^^^^^^^^^^^^^^^ +### Message Headers The following headers are supported by this component: -[[HDFS-Produceronly]] -Producer only -+++++++++++++ +#### Producer only [width="100%",cols="10%,90%",options="header",] |======================================================================= @@ -217,9 +205,7 @@ link:expression.html[Expression] object. Only relevant when not using a split strategy. |======================================================================= -[[HDFS-Controllingtoclosefilestream]] -Controlling to close file stream -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Controlling to close file stream *Available as of Camel 2.10.4* @@ -234,9 +220,7 @@ the stream should be closed or not. Notice this does not apply if you use a split strategy, as there are various strategies that can control when the stream is closed. -[[HDFS-UsingthiscomponentinOSGi]] -Using this component in OSGi -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Using this component in OSGi This component is fully functional in an OSGi environment, however, it requires some actions from the user. Hadoop uses the thread context @@ -245,4 +229,4 @@ classloader will be the bundle class loader of the bundle that contains the routes. So, the default configuration files need to be visible from the bundle class loader. A typical way to deal with it is to keep a copy of core-default.xml in your bundle root. That file can be found in the -hadoop-common.jar. +hadoop-common.jar. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc b/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc index e9ec68d..e08eb49 100644 --- a/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc +++ b/components/camel-hdfs2/src/main/docs/hdfs2-component.adoc @@ -1,4 +1,4 @@ -# HDFS2 Component +## HDFS2 Component *Available as of Camel 2.13* @@ -19,9 +19,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[HDFS2-URIformat]] -URI format -^^^^^^^^^^ +### URI format [source,java] ---------------------------------------- @@ -48,9 +46,7 @@ chunk using the chunkSize option. If you want to read from hdfs and write to a regular file using the file component, then you can use the fileMode=Append to append each of the chunks together. -[[HDFS2-Options]] -Options -^^^^^^^ +### Options @@ -130,9 +126,7 @@ The HDFS2 component supports 41 endpoint options which are listed below: -[[HDFS2-KeyTypeandValueType]] -KeyType and ValueType -+++++++++++++++++++++ +#### KeyType and ValueType * NULL it means that the key or the value is absent * BYTE for writing a byte, the java Byte class is mapped into a BYTE @@ -148,9 +142,7 @@ BYTES is also used with everything else, for example, in Camel a file is sent around as an InputStream, int this case is written in a sequence file or a map file as a sequence of bytes. -[[HDFS2-SplittingStrategy]] -Splitting Strategy -^^^^^^^^^^^^^^^^^^ +### Splitting Strategy In the current version of Hadoop opening a file in append mode is disabled since it's not very reliable. So, for the moment, it's only @@ -190,15 +182,11 @@ than 1 second or if more than 5 bytes have been written. So, running `hadoop fs -ls /tmp/simple-file` you'll see that multiple files have been created. -[[HDFS2-MessageHeaders]] -Message Headers -^^^^^^^^^^^^^^^ +### Message Headers The following headers are supported by this component: -[[HDFS2-Produceronly]] -Producer only -+++++++++++++ +#### Producer only [width="100%",cols="10%,90%",options="header",] |======================================================================= @@ -210,9 +198,7 @@ link:expression.html[Expression] object. Only relevant when not using a split strategy. |======================================================================= -[[HDFS2-Controllingtoclosefilestream]] -Controlling to close file stream -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Controlling to close file stream When using the link:hdfs2.html[HDFS2] producer *without* a split strategy, then the file output stream is by default closed after the @@ -225,9 +211,7 @@ the stream should be closed or not. Notice this does not apply if you use a split strategy, as there are various strategies that can control when the stream is closed. -[[HDFS2-UsingthiscomponentinOSGi]] -Using this component in OSGi -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Using this component in OSGi There are some quirks when running this component in an OSGi environment related to the mechanism Hadoop 2.x uses to discover different @@ -242,9 +226,7 @@ be visible from the bundle class loader. A typical way to deal with it is to keep a copy of `core-default.xml` (and e.g., `hdfs-default.xml`) in your bundle root. -[[HDFS2-Usingthiscomponentwithmanuallydefinedroutes]] -Using this component with manually defined routes -+++++++++++++++++++++++++++++++++++++++++++++++++ +#### Using this component with manually defined routes There are two options: @@ -265,9 +247,7 @@ FileSystem.get("hdfs://localhost:9000/", conf); ... ---------------------------------------------------------------------------------------------------- -[[HDFS2-UsingthiscomponentwithBlueprintcontainer]] -Using this component with Blueprint container -+++++++++++++++++++++++++++++++++++++++++++++ +#### Using this component with Blueprint container Two options: @@ -291,4 +271,4 @@ resource with bundle that contains blueprint definition. ------------------------------------------------------------------------------------------------------ This way Hadoop 2.x will have correct mapping of URI schemes to -filesystem implementations. +filesystem implementations. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hessian/src/main/docs/hessian-dataformat.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hessian/src/main/docs/hessian-dataformat.adoc b/components/camel-hessian/src/main/docs/hessian-dataformat.adoc index b2b7abb..a42c9c8 100644 --- a/components/camel-hessian/src/main/docs/hessian-dataformat.adoc +++ b/components/camel-hessian/src/main/docs/hessian-dataformat.adoc @@ -1,4 +1,4 @@ -# Hessian DataFormat +## Hessian DataFormat Hessian is Data Format for marshalling and unmarshalling messages using Caucho's Hessian format. @@ -14,9 +14,7 @@ If you want to use Hessian Data Format from Maven, add the following dependency </dependency> ------------------------------------------------------------ -[[HessianDataFormat-Options]] -Options -^^^^^^^ +### Options // dataformat options: START The Hessian dataformat supports 1 options which are listed below. @@ -32,9 +30,7 @@ The Hessian dataformat supports 1 options which are listed below. {% endraw %} // dataformat options: END -[[hessian-UsingHessianDataFormat]] -Using the Hessian data format in Java DSL -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Using the Hessian data format in Java DSL [source,java] -------------------------------------------------------------------------------- @@ -42,9 +38,7 @@ Using the Hessian data format in Java DSL .marshal().hessian(); -------------------------------------------------------------------------------- -[[hessian-UsingHessianDataFormatXml]] -Using the Hessian data format in Spring DSL -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### Using the Hessian data format in Spring DSL [source,xml] -------------------------------------------------------------------------------- @@ -54,4 +48,4 @@ Using the Hessian data format in Spring DSL <marshal ref="hessian"/> </route> </camelContext> --------------------------------------------------------------------------------- +-------------------------------------------------------------------------------- \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hipchat/src/main/docs/hipchat-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hipchat/src/main/docs/hipchat-component.adoc b/components/camel-hipchat/src/main/docs/hipchat-component.adoc index 067aef7..063a165 100644 --- a/components/camel-hipchat/src/main/docs/hipchat-component.adoc +++ b/components/camel-hipchat/src/main/docs/hipchat-component.adoc @@ -1,4 +1,4 @@ -# Hipchat Component +## Hipchat Component *Available as of Camel 2.15.0* @@ -12,9 +12,7 @@ https://www.hipchat.com/account/api[personal access token] that you can use to produce/consume messages. -[[Hipchat-URIFormat]] -URI Format -^^^^^^^^^^ +### URI Format [source,java] ------------------------------- @@ -24,9 +22,7 @@ hipchat://[host][:port]?options You can append query options to the URI in the following format, ?options=value&option2=value&... -[[Hipchat-URIOptions]] -URI Options -^^^^^^^^^^^ +### URI Options // component options: START @@ -78,9 +74,7 @@ The Hipchat component supports 24 endpoint options which are listed below: -[[Hipchat-ScheduledPollConsumer]] -Scheduled Poll Consumer -^^^^^^^^^^^^^^^^^^^^^^^ +### Scheduled Poll Consumer This component implements the link:polling-consumer.html[ScheduledPollConsumer]. Only the last message @@ -105,9 +99,7 @@ public void configure() throws Exception { } --------------------------------------------------------------------------------- -[[Hipchat-MessageheaderssetbytheHipchatconsumer]] -Message headers set by the Hipchat consumer -+++++++++++++++++++++++++++++++++++++++++++ +#### Message headers set by the Hipchat consumer [width="100%",cols="10%,10%,10%,70%",options="header",] |======================================================================= @@ -124,9 +116,7 @@ Hipchat https://www.hipchat.com/docs/apiv2/method/view_recent_privatechat_histor The status of the API response received. |======================================================================= -[[Hipchat-HipchatProducer]] -Hipchat Producer -^^^^^^^^^^^^^^^^ +### Hipchat Producer Producer can send messages to both Room's and User's simultaneously. The body of the exchange is sent as message. Sample usage is shown below. @@ -143,9 +133,7 @@ Appropriate headers needs to be set. } ---------------------------------------------------------- -[[Hipchat-MessageheadersevaluatedbytheHipchatproducer]] -Message headers evaluated by the Hipchat producer -+++++++++++++++++++++++++++++++++++++++++++++++++ +#### Message headers evaluated by the Hipchat producer [width="100%",cols="10%,10%,10%,70%",options="header",] |======================================================================= @@ -166,9 +154,7 @@ a user notification (change the tab color, play a sound, notify mobile phones, etc). *Default: 'false' (Room Only)* |======================================================================= -[[Hipchat-MessageheaderssetbytheHipchatproducer]] -Message headers set by the Hipchat producer -+++++++++++++++++++++++++++++++++++++++++++ +#### Message headers set by the Hipchat producer [width="100%",cols="10%,10%,10%,70%",options="header",] |======================================================================= @@ -181,9 +167,7 @@ The status of the API response received when message sent to the user. |HipchatFromUserResponseStatus |HipchatConstants.TO_ROOM_RESPONSE_STATUS |_http://hc.apache.org/httpcomponents-core-4.2.x/httpcore/apidocs/org/apache/http/StatusLine.html[StatusLine]_ |The status of the API response received when message sent to the room. |======================================================================= -[[Hipchat-Dependencies]] -Dependencies -++++++++++++ +#### Dependencies Maven users will need to add the following dependency to their pom.xml. @@ -199,4 +183,4 @@ Maven users will need to add the following dependency to their pom.xml. ------------------------------------------ where `${camel-version}` must be replaced by the actual version of Camel -(2.15.0 or higher) +(2.15.0 or higher) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hl7/src/main/docs/hl7-dataformat.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc index cbdfcb1..6691468 100644 --- a/components/camel-hl7/src/main/docs/hl7-dataformat.adoc +++ b/components/camel-hl7/src/main/docs/hl7-dataformat.adoc @@ -1,4 +1,4 @@ -# HL7 DataFormat +## HL7 DataFormat The *HL7* component is used for working with the HL7 MLLP protocol and http://www.hl7.org/implement/standards/product_brief.cfm?product_id=185[HL7 @@ -26,9 +26,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[HL7-HL7MLLPprotocol]] -HL7 MLLP protocol -^^^^^^^^^^^^^^^^^ +### HL7 MLLP protocol HL7 is often used with the HL7 MLLP protocol, which is a text based TCP socket based protocol. This component ships with a Mina and Netty4 Codec @@ -66,9 +64,7 @@ the HL7 message content. segment terminators. The HAPI library requires the use of `\r`. |======================================================================= -[[HL7-ExposinganHL7listenerusingMina]] -Exposing an HL7 listener using Mina -+++++++++++++++++++++++++++++++++++ +#### Exposing an HL7 listener using Mina In the Spring XML file, we configure a mina2 endpoint to listen for HL7 requests using TCP on port `8888`: @@ -128,9 +124,7 @@ public class PatientLookupService { } ---------------------------------------------------------------------------------------------------- -[[HL7-ExposinganHL7listenerusingNetty]] -Exposing an HL7 listener using Netty (available from Camel 2.15 onwards) -++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +#### Exposing an HL7 listener using Netty (available from Camel 2.15 onwards) In the Spring XML file, we configure a netty4 endpoint to listen for HL7 requests using TCP on port `8888`: @@ -160,9 +154,7 @@ consumer, as this Java DSL example illustrates: from("hl7NettyListener").beanRef("patientLookupService"); ------------------------------------------------------------- -[[HL7-HL7Modelusingjava.lang.Stringorbyte]] -HL7 Model using java.lang.String or byte[] -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### HL7 Model using java.lang.String or byte[] The HL7 MLLP codec uses plain String as its data format. Camel uses its link:type-converter.html[Type Converter] to convert to/from strings to @@ -174,9 +166,7 @@ plain `byte[]` as its data format by setting the `produceString` property to false. The Type Converter is also capable of converting the `byte[]` to/from HAPI HL7 model objects. -[[HL7-HL7v2ModelusingHAPI]] -HL7v2 Model using HAPI -^^^^^^^^^^^^^^^^^^^^^^ +### HL7v2 Model using HAPI The HL7v2 model uses Java objects from the HAPI library. Using this library, you can encode and decode from the EDI format (ER7) that is @@ -212,9 +202,7 @@ QRY_A19 msg = exchange.getIn().getBody(QRY_A19.class); String patientId = msg.getQRD().getWhoSubjectFilter(0).getIDNumber().getValue(); -------------------------------------------------------------------------------- -[[HL7-HL7DataFormat]] -HL7 DataFormat -^^^^^^^^^^^^^^ +### HL7 DataFormat The link:hl7.html[HL7] component ships with a HL7 data format that can be used to marshal or unmarshal HL7 model objects. @@ -300,9 +288,7 @@ object: from("jms:queue:hl7out").unmarshal().hl7().to("patientLookupService"); ------------------------------------------------------------------------ -[[HL7-MessageHeaders]] -Message Headers -^^^^^^^^^^^^^^^ +### Message Headers The unmarshal operation adds these fields from the MSH segment as headers on the Camel message: @@ -343,9 +329,7 @@ that was used to parse the message All headers except `CamelHL7Context `are `String` types. If a header value is missing, its value is `null`. -[[HL7-Options]] -Options -^^^^^^^ +### Options The HL7 Data Format supports the following options: @@ -369,9 +353,7 @@ custom ValidationContext etc. This gives you full control over the HL7 parsing and rendering process. |======================================================================= -[[HL7-Dependencies]] -Dependencies -^^^^^^^^^^^^ +### Dependencies To use HL7 in your Camel routes you'll need to add a dependency on *camel-hl7* listed above, which implements this data format. @@ -434,9 +416,7 @@ repository]. </dependency> ------------------------------------------- -[[HL7-Terserlanguage]] -Terser language -^^^^^^^^^^^^^^^ +### Terser language http://hl7api.sourceforge.net[HAPI] provides a http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/util/Terser.html[Terser] @@ -463,9 +443,7 @@ import static org.apache.camel.component.hl7.HL7.terser; .to("mock:test2"); -------------------------------------------------------------------------------------------------- -[[HL7-HL7Validationpredicate]] -HL7 Validation predicate -^^^^^^^^^^^^^^^^^^^^^^^^ +### HL7 Validation predicate Often it is preferable to first parse a HL7v2 message and in a separate step validate it against a HAPI @@ -488,9 +466,7 @@ import ca.uhn.hl7v2.validation.impl.DefaultValidation; .to("mock:test1"); ---------------------------------------------------------------------- -[[HL7-HL7ValidationpredicateusingtheHapiContext]] -HL7 Validation predicate using the HapiContext (Camel 2.14) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### HL7 Validation predicate using the HapiContext (Camel 2.14) The HAPI Context is always configured with a http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/validation/ValidationContext.html[ValidationContext] @@ -533,9 +509,7 @@ import static org.apache.camel.component.hl7.HL7.messageConforms  -[[HL7-HL7Acknowledgementexpression]] -HL7 Acknowledgement expression -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### HL7 Acknowledgement expression A common task in HL7v2 processing is to generate an acknowledgement message as response to an incoming HL7v2 message, e.g. based on a @@ -564,9 +538,7 @@ import ca.uhn.hl7v2.validation.impl.DefaultValidation; .transform(ack()) ------------------------------------------------------------------------------------------ -[[HL7-MoreSamples]] -More Samples -^^^^^^^^^^^^ +### More Samples In the following example, a plain `String` HL7 request is sent to an HL7 listener that sends back a response: @@ -584,12 +556,9 @@ the example above.  -[[HL7-SeeAlso]] -See Also -^^^^^^^^ +### See Also * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] -* link:getting-started.html[Getting Started] - +* link:getting-started.html[Getting Started] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-hl7/src/main/docs/terser-language.adoc ---------------------------------------------------------------------- diff --git a/components/camel-hl7/src/main/docs/terser-language.adoc b/components/camel-hl7/src/main/docs/terser-language.adoc index c176659..8d9e340 100644 --- a/components/camel-hl7/src/main/docs/terser-language.adoc +++ b/components/camel-hl7/src/main/docs/terser-language.adoc @@ -1,7 +1,5 @@ -# HL7 Terser Language -[[HL7-Terserlanguage]] -Terser language -^^^^^^^^^^^^^^^ +## HL7 Terser Language +### Terser language http://hl7api.sourceforge.net[HAPI] provides a http://hl7api.sourceforge.net/base/apidocs/ca/uhn/hl7v2/util/Terser.html[Terser] @@ -28,9 +26,7 @@ import static org.apache.camel.component.hl7.HL7.terser; .to("mock:test2"); -------------------------------------------------------------------------------------------------- -[[HL7-Terserlanguage-options]] -Terser Language options -^^^^^^^^^^^^^^^^^^^^^^^ +### Terser Language options // language options: START The HL7 Terser language supports 1 options which are listed below. @@ -44,5 +40,4 @@ The HL7 Terser language supports 1 options which are listed below. | trim | true | Boolean | Whether to trim the value to remove leading and trailing whitespaces and line breaks |======================================================================= {% endraw %} -// language options: END - +// language options: END \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/28429681/components/camel-http/src/main/docs/http-component.adoc ---------------------------------------------------------------------- diff --git a/components/camel-http/src/main/docs/http-component.adoc b/components/camel-http/src/main/docs/http-component.adoc index f1fe9a5..4f404ee 100644 --- a/components/camel-http/src/main/docs/http-component.adoc +++ b/components/camel-http/src/main/docs/http-component.adoc @@ -1,4 +1,4 @@ -# HTTP Component +## HTTP Component The *http:* component provides HTTP based link:endpoint.html[endpoints] for consuming external HTTP resources (as a client to call external @@ -17,9 +17,7 @@ for this component: </dependency> ------------------------------------------------------------ -[[HTTP-URIformat]] -URI format -^^^^^^^^^^ +### URI format [source,java] ------------------------------------------------------------------ @@ -37,9 +35,7 @@ route, you can use the link:jetty.html[Jetty Component] or the link:servlet.html[Servlet Component] -[[HTTP-Examples]] -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 @@ -110,9 +106,7 @@ from("direct:start") <to uri="mock:results"/> ---------------------------------------- -[[HTTP-HttpOptions]] -Http Options -^^^^^^^^^^^^ +### Http Options @@ -186,9 +180,7 @@ The HTTP component supports 26 endpoint options which are listed below: -[[HTTP-MessageHeaders]] -Message Headers -^^^^^^^^^^^^^^^ +### Message Headers [width="100%",cols="10%,10%,80%",options="header",] |======================================================================= @@ -233,18 +225,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. -[[HTTP-MessageBody]] -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. -[[HTTP-Responsecode]] -Response code -^^^^^^^^^^^^^ +### Response code Camel will handle according to the HTTP response code: @@ -264,9 +252,7 @@ codes. This allows you to get any response from the remote server. + There is a sample below demonstrating this. -[[HTTP-HttpOperationFailedException]] -HttpOperationFailedException -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +### HttpOperationFailedException This exception contains the following information: @@ -276,9 +262,7 @@ This exception contains the following information: * Response body as a `java.lang.String`, if server provided a body as response -[[HTTP-CallingusingGETorPOST]] -Calling using GET or POST -^^^^^^^^^^^^^^^^^^^^^^^^^ +### Calling using GET or POST The following algorithm is used to determine if either `GET` or `POST` HTTP method should be used: + @@ -288,9 +272,7 @@ HTTP method should be used: + 4. `POST` if there is data to send (body is not null). + 5. `GET` otherwise. -[[HTTP-HowtogetaccesstoHttpServletRequestandHttpServletResponse]] -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 @@ -301,20 +283,14 @@ HttpServletRequest request = exchange.getIn().getBody(HttpServletRequest.class); HttpServletRequest response = exchange.getIn().getBody(HttpServletResponse.class); ---------------------------------------------------------------------------------- -[[HTTP-Usingclienttimeout-SO_TIMEOUT]] -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] -[[HTTP-MoreExamples]] -More Examples -~~~~~~~~~~~~~ +### More Examples -[[HTTP-ConfiguringaProxy]] -Configuring a Proxy -^^^^^^^^^^^^^^^^^^^ +### Configuring a Proxy Java DSL @@ -327,9 +303,7 @@ from("direct:start") There is also support for proxy authentication via the `proxyUsername` and `proxyPassword` options. -[[HTTP-UsingproxysettingsoutsideofURI]] -Using proxy settings outside of URI -+++++++++++++++++++++++++++++++++++ +#### Using proxy settings outside of URI Java DSL @@ -353,9 +327,7 @@ Spring DSL Options on Endpoint will override options on the context. -[[HTTP-Configuringcharset]] -Configuring charset -^^^^^^^^^^^^^^^^^^^ +### Configuring charset If you are using `POST` to send data you can configure the `charset` @@ -364,9 +336,7 @@ If you are using `POST` to send data you can configure the `charset` setProperty(Exchange.CHARSET_NAME, "iso-8859-1"); ------------------------------------------------- -[[HTTP-Samplewithscheduledpoll]] -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`: @@ -378,9 +348,7 @@ from("timer://foo?fixedRate=true&delay=0&period=10000") .setHeader(FileComponent.HEADER_FILE_NAME, "message.html").to("file:target/google"); ---------------------------------------------------------------------------------------- -[[HTTP-GettingtheResponseCode]] -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 @@ -397,9 +365,7 @@ the value from the Out message header with int responseCode = out.getHeader(Exchange.HTTP_RESPONSE_CODE, Integer.class); ---------------------------------------------------------------------------------------------- -[[HTTP-UsingthrowExceptionOnFailure=falsetogetanyresponseback]] -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 link:content-enricher.html[enrich] with data returned from a remote HTTP @@ -408,25 +374,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. -[[HTTP-DisablingCookies]] -Disabling Cookies -^^^^^^^^^^^^^^^^^ +### Disabling Cookies To disable cookies you can set the HTTP Client to ignore cookies by adding this URI option: + `httpClient.cookiePolicy=ignoreCookies` -[[HTTP-AdvancedUsage]] -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. -[[HTTP-SettingMaxConnectionsPerHost]] -Setting MaxConnectionsPerHost -+++++++++++++++++++++++++++++ +#### Setting MaxConnectionsPerHost The link:http.html[HTTP] Component has a `org.apache.commons.httpclient.HttpConnectionManager` where you can @@ -445,9 +405,7 @@ connection to 5 instead of the default of 2. And then we can just use it as we normally do in our routes: -[[HTTP-Usingpreemptiveauthentication]] -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 @@ -455,18 +413,14 @@ did not return a HTTP code 401 Authorization Required. The solution was to set the following URI option: `httpClient.authenticationPreemptive=true` -[[HTTP-Acceptingselfsignedcertificatesfromremoteserver]] -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. -[[HTTP-SettingupSSLforHTTPClient]] -Setting up SSL for HTTP Client -++++++++++++++++++++++++++++++ +#### Setting up SSL for HTTP Client [[HTTP-UsingtheJSSEConfigurationUtility]] Using the JSSE Configuration Utility @@ -559,14 +513,11 @@ If you are doing this using the Spring DSL, you can specify your As long as you implement the HttpClientConfigurer and configure your keystore and truststore as described above, it will work fine. -[[HTTP-SeeAlso]] -See Also -^^^^^^^^ +### See Also * link:configuring-camel.html[Configuring Camel] * link:component.html[Component] * link:endpoint.html[Endpoint] * link:getting-started.html[Getting Started] -* link:jetty.html[Jetty] - +* link:jetty.html[Jetty] \ No newline at end of file