You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/06/08 14:38:32 UTC

[1/2] camel git commit: Added camel-syslog Dataformat docs to Gitbook

Repository: camel
Updated Branches:
  refs/heads/master 9bad61d33 -> 3d00cb721


Added camel-syslog Dataformat docs to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f4041579
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f4041579
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f4041579

Branch: refs/heads/master
Commit: f40415796d91afeca53e6d968449febc8d956cd2
Parents: 9bad61d
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Jun 8 16:32:12 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Jun 8 16:32:12 2016 +0200

----------------------------------------------------------------------
 .../camel-syslog/src/main/docs/syslog.adoc      | 137 +++++++++++++++++++
 docs/user-manual/en/SUMMARY.md                  |   1 +
 2 files changed, 138 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f4041579/components/camel-syslog/src/main/docs/syslog.adoc
----------------------------------------------------------------------
diff --git a/components/camel-syslog/src/main/docs/syslog.adoc b/components/camel-syslog/src/main/docs/syslog.adoc
new file mode 100644
index 0000000..3cead3e
--- /dev/null
+++ b/components/camel-syslog/src/main/docs/syslog.adoc
@@ -0,0 +1,137 @@
+[[Syslog-SyslogDataFormat]]
+Syslog DataFormat
+~~~~~~~~~~~~~~~~~
+
+*Available as of Camel 2.6*
+
+The *syslog* dataformat is used for working with
+http://www.ietf.org/rfc/rfc3164.txt[RFC3164]�and RFC5424 messages.
+
+This component supports the following:
+
+* UDP consumption of syslog messages
+* Agnostic data format using either plain String objects or
+SyslogMessage model objects.
+* link:type-converter.html[Type Converter] from/to SyslogMessage and
+String
+* Integration with the link:mina.html[camel-mina] component.
+* Integration with the link:netty.html[camel-netty] component.
+* *Camel 2.14:* Encoder and decoder for
+the�link:netty.html[camel-netty]�component.
+* *Camel 2.14:*�Support for RFC5424 also.
+
+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-syslog</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+[[Syslog-RFC3164Syslogprotocol]]
+RFC3164 Syslog protocol
+^^^^^^^^^^^^^^^^^^^^^^^
+
+Syslog uses the user datagram protocol (UDP)
+https://cwiki.apache.org/confluence/pages/createpage.action?spaceKey=CAMEL&title=1&linkCreation=true&fromPageId=24185759[1]
+as its underlying transport layer mechanism.  +
+ The UDP port that has been assigned to syslog is 514.
+
+To expose a Syslog listener service we reuse the existing
+link:mina.html[camel-mina] component or link:netty.html[camel-netty]
+where we just use the `Rfc3164SyslogDataFormat` to marshal and unmarshal
+messages. Notice that from�*Camel 2.14* onwards the syslog dataformat is
+renamed to `SyslogDataFormat`.
+
+[[Syslog-RFC5424Syslogprotocol]]
+RFC5424 Syslog protocol
+^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.14*
+
+To expose a Syslog listener service we reuse the
+existing�link:mina.html[camel-mina]�component
+or�link:netty.html[camel-netty]�where we just use
+the�`SyslogDataFormat`�to marshal and unmarshal messages
+
+[[Syslog-ExposingaSysloglistener]]
+Exposing a Syslog listener
+++++++++++++++++++++++++++
+
+In our Spring XML file, we configure an endpoint to listen for udp
+messages on port 10514, note that in netty we disable the defaultCodec,
+this  +
+ will allow a fallback to a NettyTypeConverter and delivers the message
+as an InputStream:
+
+[source,xml]
+------------------------------------------------------------------------------------------
+<camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
+
+    <dataFormats>
+          <syslog id="mySyslog"/>
+    </dataFormats>
+
+    <route>
+          <from uri="netty:udp://localhost:10514?sync=false&amp;allowDefaultCodec=false"/>
+          <unmarshal ref="mySyslog"/>
+          <to uri="mock:stop1"/>
+    </route>
+
+</camelContext>
+------------------------------------------------------------------------------------------
+
+The same route using link:mina.html[camel-mina]
+
+[source,xml]
+-------------------------------------------------------------------------
+<camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
+
+    <dataFormats>
+          <syslog id="mySyslog"/>
+    </dataFormats>
+
+    <route>
+          <from uri="mina:udp://localhost:10514"/>
+          <unmarshal ref="mySyslog"/>
+          <to uri="mock:stop1"/>
+    </route>
+
+</camelContext>
+-------------------------------------------------------------------------
+
+[[Syslog-Sendingsyslogmessagestoaremotedestination]]
+Sending syslog messages to a remote destination
++++++++++++++++++++++++++++++++++++++++++++++++
+
+[source,xml]
+-------------------------------------------------------------------------
+<camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
+
+    <dataFormats>
+        <syslog id="mySyslog"/>
+    </dataFormats>
+
+    <route>
+        <from uri="direct:syslogMessages"/>
+        <marshal ref="mySyslog"/>
+        <to uri="mina:udp://remotehost:10514"/>
+    </route>
+
+</camelContext>
+-------------------------------------------------------------------------
+
+[[Syslog-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/f4041579/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 90324ea..d5e0b4e 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -289,6 +289,7 @@
     * [Jaxb](jaxb.adoc)
     * [Jibx](jibx.adoc)
     * [Lzf](lzf.adoc)
+    * [Syslog](syslog.adoc)
     * [SOAP](soap.adoc)
     * [YAML](yaml.adoc)
     * [XML JSON](xmljson.adoc)


[2/2] camel git commit: Added camel-tagsoup Dataformat docs to Gitbook

Posted by ac...@apache.org.
Added camel-tagsoup Dataformat docs to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3d00cb72
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3d00cb72
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3d00cb72

Branch: refs/heads/master
Commit: 3d00cb7218c38214b49da96862615c636cc126ed
Parents: f404157
Author: Andrea Cosentino <an...@gmail.com>
Authored: Wed Jun 8 16:37:44 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Wed Jun 8 16:37:44 2016 +0200

----------------------------------------------------------------------
 .../camel-tagsoup/src/main/docs/tagsoup.adoc    | 69 ++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md                  |  1 +
 2 files changed, 70 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3d00cb72/components/camel-tagsoup/src/main/docs/tagsoup.adoc
----------------------------------------------------------------------
diff --git a/components/camel-tagsoup/src/main/docs/tagsoup.adoc b/components/camel-tagsoup/src/main/docs/tagsoup.adoc
new file mode 100644
index 0000000..1ac5d92
--- /dev/null
+++ b/components/camel-tagsoup/src/main/docs/tagsoup.adoc
@@ -0,0 +1,69 @@
+[[TidyMarkup-TidyMarkup]]
+TidyMarkup
+~~~~~~~~~~
+
+TidyMarkup is a link:data-format.html[Data Format] that uses the
+http://www.ccil.org/~cowan/XML/tagsoup/[TagSoup] to tidy up HTML. It can
+be used to parse ugly HTML and return it as pretty wellformed HTML.
+
+*Camel eats our own -dog food- soap*
+
+We had some issues in our pdf link:manual.html[Manual] where we had some
+strange symbols. So http://janstey.blogspot.com/[Jonathan] used this
+data format to tidy up the wiki html pages that are used as base for
+rendering the pdf manuals. And then the mysterious symbols vanished.
+
+link:tidymarkup.html[TidyMarkup] only supports the *unmarshal* operation
+as we really don't want to turn well formed HTML into ugly HTML
+image:https://cwiki.apache.org/confluence/s/en_GB/5982/f2b47fb3d636c8bc9fd0b11c0ec6d0ae18646be7.1/_/images/icons/emoticons/smile.png[(smile)]
+
+[[TidyMarkup-JavaDSLExample]]
+Java DSL Example
+^^^^^^^^^^^^^^^^
+
+An example where the consumer provides some HTML
+
+[source,java]
+---------------------------------------------------------------------------
+from("file://site/inbox").unmarshal().tidyMarkup().to("file://site/blogs");
+---------------------------------------------------------------------------
+
+[[TidyMarkup-SpringXMLExample]]
+Spring XML Example
+^^^^^^^^^^^^^^^^^^
+
+The following example shows how to use link:tidymarkup.html[TidyMarkup]
+to unmarshal using Spring
+
+[source,java]
+-----------------------------------------------------------------------
+<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
+  <route>
+    <from uri="file://site/inbox"/>
+    <unmarshal>
+      <tidyMarkup/>
+    </unmarshal>
+    <to uri="file://site/blogs"/>
+  </route>
+</camelContext>
+-----------------------------------------------------------------------
+
+[[TidyMarkup-Dependencies]]
+Dependencies
+^^^^^^^^^^^^
+
+To use TidyMarkup in your camel routes you need to add the a dependency
+on *camel-tagsoup* which implements this data format.
+
+If you use maven you could just add the following to your pom.xml,
+substituting the version number for the latest & greatest release (see
+link:download.html[the download page for the latest versions]).
+
+[source,java]
+----------------------------------------
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-tagsoup</artifactId>
+  <version>x.x.x</version>
+</dependency>
+----------------------------------------

http://git-wip-us.apache.org/repos/asf/camel/blob/3d00cb72/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index d5e0b4e..4c3339f 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -291,6 +291,7 @@
     * [Lzf](lzf.adoc)
     * [Syslog](syslog.adoc)
     * [SOAP](soap.adoc)
+    * [Tagsoup](tagsoup.adoc)
     * [YAML](yaml.adoc)
     * [XML JSON](xmljson.adoc)
     * [YAML](yaml.adoc)