Repository: camel
Updated Branches:
  refs/heads/master 3bb6b4d4d -> 02a6a4ded


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

Branch: refs/heads/master
Commit: fc82672354fa4e7e4907c724602d0c1ad56f55f5
Parents: 3bb6b4d
Author: Andrea Cosentino <anco...@gmail.com>
Authored: Thu Jun 9 13:00:48 2016 +0200
Committer: Andrea Cosentino <anco...@gmail.com>
Committed: Thu Jun 9 13:00:48 2016 +0200

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


http://git-wip-us.apache.org/repos/asf/camel/blob/fc826723/components/camel-xmpp/src/main/docs/xmpp.adoc
----------------------------------------------------------------------
diff --git a/components/camel-xmpp/src/main/docs/xmpp.adoc 
b/components/camel-xmpp/src/main/docs/xmpp.adoc
new file mode 100644
index 0000000..62ffcc4
--- /dev/null
+++ b/components/camel-xmpp/src/main/docs/xmpp.adoc
@@ -0,0 +1,165 @@
+[[XMPP-XMPPComponent]]
+XMPP Component
+~~~~~~~~~~~~~~
+
+The *xmpp:* component implements an XMPP (Jabber) transport.
+
+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-xmpp</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+[[XMPP-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,text]
+------------------------------------------------------
+xmpp://[login@]hostname[:port][/participant][?Options]
+------------------------------------------------------
+
+The component supports both room based and private person-person
+conversations. +
+ The component supports both producer and consumer (you can get messages
+from XMPP or send messages to XMPP). Consumer mode supports rooms
+starting.
+
+You can append query options to the URI in the following format,
+`?option=value&option=value&...`
+
+[[XMPP-Options]]
+Options
+^^^^^^^
+
+
+// component options: START
+The XMPP component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The XMPP component supports 21 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| host | common |  | String | *Required* Hostname for the chat server
+| port | common |  | int | *Required* Port number for the chat server
+| participant | common |  | String | JID (Jabber ID) of person to receive 
messages. room parameter has precedence over participant.
+| login | common | true | boolean | Whether to login the user.
+| nickname | common |  | String | Use nickname when joining room. If room is 
specified and nickname is not user will be used for the nickname.
+| pubsub | common | false | boolean | Accept pubsub packets on input default 
is false
+| room | common |  | String | If this option is specified the component will 
connect to MUC (Multi User Chat). Usually the domain name for MUC is different 
from the login domain. For example if you are supermanjabber.org and want to 
join the krypton room then the room URL is kryptonconference.jabber.org. Note 
the conference part. It is not a requirement to provide the full room JID. If 
the room parameter does not contain the symbol the domain part will be 
discovered and added by Camel
+| serviceName | common |  | String | The name of the service you are 
connecting to. For Google Talk this would be gmail.com.
+| testConnectionOnStartup | common | true | boolean | Specifies whether to 
test the connection on startup. This is used to ensure that the XMPP client has 
a valid connection to the XMPP server when the route starts. Camel throws an 
exception on startup if a connection cannot be established. When this option is 
set to false Camel will attempt to establish a lazy connection when needed by a 
producer and will poll for a consumer connection until the connection is 
established. Default is true.
+| createAccount | common (advanced) | false | boolean | If true an attempt to 
create an account will be made. Default is false.
+| resource | common (advanced) | Camel | String | XMPP resource. The default 
is Camel.
+| bridgeErrorHandler | consumer | false | boolean | Allows for bridging the 
consumer to the Camel routing Error Handler which mean any exceptions occurred 
while the consumer is trying to pickup incoming messages or the likes will now 
be processed as a message and handled by the routing Error Handler. By default 
the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions that will be logged at WARN/ERROR level and ignored.
+| connectionPollDelay | consumer | 10 | int | The amount of time in seconds 
between polls (in seconds) to verify the health of the XMPP connection or 
between attempts to establish an initial consumer connection. Camel will try to 
re-establish a connection if it has become inactive. Default is 10 seconds.
+| doc | consumer | false | boolean | Set a doc header on the IN message 
containing a Document form of the incoming packet; default is true if presence 
or pubsub are true otherwise false
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the 
consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler 
is enabled then this options is not in use. By default the consumer will deal 
with exceptions that will be logged at WARN/ERROR level and ignored.
+| connectionConfig | advanced |  | ConnectionConfiguration | To use an 
existing connection configuration
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default 
exchange pattern when creating an exchange
+| synchronous | advanced | false | boolean | Sets whether synchronous 
processing should be strictly used or Camel is allowed to use asynchronous 
processing (if supported).
+| headerFilterStrategy | filter |  | HeaderFilterStrategy | To use a custom 
HeaderFilterStrategy to filter header to and from Camel message.
+| password | security |  | String | Password for login
+| user | security |  | String | User name (without server name). If not 
specified anonymous login will be attempted.
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[XMPP-HeadersandsettingSubjectorLanguage]]
+Headers and setting Subject or Language
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Camel sets the message IN headers as properties on the XMPP message. You
+can configure a `HeaderFilterStategy` if you need custom filtering of
+headers. 
+The *Subject* and *Language* of the XMPP message are also set if they
+are provided as IN headers.
+
+[[XMPP-Examples]]
+Examples
+^^^^^^^^
+
+User `superman` to join room `krypton` at `jabber` server with password,
+`secret`:
+
+[source,text]
+------------------------------------------------------------------------------
+xmpp://super...@jabber.org/?room=kryp...@conference.jabber.org&password=secret
+------------------------------------------------------------------------------
+
+User `superman` to send messages to `joker`:
+
+[source,text]
+-----------------------------------------------------------
+xmpp://super...@jabber.org/jo...@jabber.org?password=secret
+-----------------------------------------------------------
+
+Routing example in Java:
+
+[source,java]
+------------------------------------------------------------------
+from("timer://kickoff?period=10000").
+setBody(constant("I will win!\n Your Superman.")).
+to("xmpp://super...@jabber.org/jo...@jabber.org?password=secret");
+------------------------------------------------------------------
+
+Consumer configuration, which writes all messages from `joker` into the
+queue, `evil.talk`.
+
+[source,java]
+--------------------------------------------------------------------
+from("xmpp://super...@jabber.org/jo...@jabber.org?password=secret").
+to("activemq:evil.talk");
+--------------------------------------------------------------------
+
+Consumer configuration, which listens to room messages:
+
+[source,java]
+---------------------------------------------------------------------------------------
+from("xmpp://super...@jabber.org/?password=secret&room=kryp...@conference.jabber.org").
+to("activemq:krypton.talk");
+---------------------------------------------------------------------------------------
+
+Room in short notation (no domain part):
+
+[source,java]
+-----------------------------------------------------------------
+from("xmpp://super...@jabber.org/?password=secret&room=krypton").
+to("activemq:krypton.talk");
+-----------------------------------------------------------------
+
+When connecting to the Google Chat service, you'll need to specify the
+`serviceName` as well as your credentials:
+
+[source,java]
+---------------------------------------------------------------------------------------------------------
+from("direct:start").
+  
to("xmpp://talk.google.com:5222/tou...@gmail.com?serviceName=gmail.com&user=fromuser&password=secret").
+  to("mock:result");
+---------------------------------------------------------------------------------------------------------
+
+ 
+
+[[XMPP-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/fc826723/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index deeab44..4377518 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -273,6 +273,7 @@
     * [Weather](weather.adoc)
     * [Websocket](websocket.adoc)
     * [XML Security](xmlsecurity.adoc)
+    * [XMPP](xmpp.adoc)
     * [Yammer](yammer.adoc)
     * [ZooKeeper](zookeeper.adoc)
 

Reply via email to