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/02/23 16:40:42 UTC

camel git commit: Added camel-dns docs to gitbook

Repository: camel
Updated Branches:
  refs/heads/master d76e8093b -> 17324e6a6


Added camel-dns 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/17324e6a
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/17324e6a
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/17324e6a

Branch: refs/heads/master
Commit: 17324e6a6f05efd09ac183ab9f5db69f6c506c37
Parents: d76e809
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue Feb 23 16:39:56 2016 +0100
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Feb 23 16:40:22 2016 +0100

----------------------------------------------------------------------
 components/camel-dns/src/main/docs/dns.adoc | 145 +++++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md              |   1 +
 2 files changed, 146 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/17324e6a/components/camel-dns/src/main/docs/dns.adoc
----------------------------------------------------------------------
diff --git a/components/camel-dns/src/main/docs/dns.adoc b/components/camel-dns/src/main/docs/dns.adoc
new file mode 100644
index 0000000..7ce61a8
--- /dev/null
+++ b/components/camel-dns/src/main/docs/dns.adoc
@@ -0,0 +1,145 @@
+[[DNS-DNS]]
+DNS
+~~~
+
+*Available as of Camel 2.7*
+
+This is an additional component for Camel to run DNS queries, using
+DNSJava. The component is a thin layer on top of
+http://www.xbill.org/dnsjava/[DNSJava]. +
+ The component offers the following operations:
+
+* ip, to resolve a domain by its ip
+* lookup, to lookup information about the domain
+* dig, to run DNS queries
+
+[Info]
+====
+ *Requires SUN JVM*
+
+The DNSJava library requires running on the SUN JVM. +
+ If you use Apache ServiceMix or Apache Karaf, you'll need to adjust the
+`etc/jre.properties` file, to add `sun.net.spi.nameservice` to the list
+of Java platform packages exported. The server will need restarting
+before this change takes effect.
+
+====
+
+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-dns</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+[[DNS-URIformat]]
+URI format
+^^^^^^^^^^
+
+The URI scheme for a DNS component is as follows
+
+[source,java]
+-------------------------
+dns://operation[?options]
+-------------------------
+
+This component only supports producers.
+
+[[DNS-Options]]
+Options
+^^^^^^^
+
+None.
+
+[[DNS-Headers]]
+Headers
+^^^^^^^
+[width="100%",cols="10%,10%,10%,70%",options="header",]
+|=======================================================================
+
+|Header |Type |Operations |Description
+
+|dns.domain |String |ip |The domain name. Mandatory.
+
+|dns.name |String |lookup |The name to lookup. Mandatory.
+
+|dns.type |   | lookup, dig |The type of the lookup. Should match the values of `org.xbill.dns.Type`.
+Optional.
+
+|dns.class |   | lookup, dig |The DNS class of the lookup. Should match the values of
+`org.xbill.dns.DClass`. Optional.
+
+|dns.query |String |dig |The query itself. Mandatory.
+
+|dns.server |String |dig |The server in particular for the query. If none is given, the default
+one specified by the OS will be used. Optional.
+|=======================================================================
+
+[[DNS-Examples]]
+Examples
+^^^^^^^^
+
+[[DNS-IPlookup]]
+IP lookup
++++++++++
+
+[source,xml]
+--------------------------------------
+        <route id="IPCheck">
+            <from uri="direct:start"/>
+            <to uri="dns:ip"/>
+        </route>
+--------------------------------------
+
+This looks up a domain's IP. For example, www.example.com resolves to
+192.0.32.10. +
+ The IP address to lookup must be provided in the header with key
+`"dns.domain"`.
+
+[[DNS-DNSlookup]]
+DNS lookup
+++++++++++
+
+[source,xml]
+--------------------------------------
+        <route id="IPCheck">
+            <from uri="direct:start"/>
+            <to uri="dns:lookup"/>
+        </route>
+--------------------------------------
+
+This returns a set of DNS records associated with a domain. +
+ The name to lookup must be provided in the header with key
+`"dns.name"`.
+
+[[DNS-DNSDig]]
+DNS Dig
++++++++
+
+Dig is a Unix command-line utility to run DNS queries.
+
+[source,xml]
+--------------------------------------
+        <route id="IPCheck">
+            <from uri="direct:start"/>
+            <to uri="dns:dig"/>
+        </route>
+--------------------------------------
+
+The query must be provided in the header with key `"dns.query"`.
+
+[[DNS-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/17324e6a/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index 8590d75..ad2266c 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -112,6 +112,7 @@
 		* [Crypto Digital Signatures](crypto-digital-signatures.adoc)
 	* [CSV](csv.adoc)
 	* [Disruptor](disruptor.adoc)
+	* [DNS](dns.adoc)
 	* [JMS](jms.adoc)
 	* [Metrics](metrics.adoc)
 	* [Properties](properties.adoc)