updating xmpp adapter docs

This commit is contained in:
Josh Long
2010-07-12 20:29:44 +00:00
parent 699c10f1dd
commit 4ad2b3c489

View File

@@ -58,7 +58,7 @@
<title>XMPP Connection</title>
<para>
To participate in the network, an actor must connect to an XMPP server. Typically this requires - at a minimum - a
<code>user</code>, a <code>password</code>, a <code>host</code>, and a <code>port</code>.
<code>user</code>, a<code>password</code>, a<code>host</code>, and a<code>port</code>.
To create an XMPP connection, you may use the XML namespace.
@@ -78,47 +78,87 @@
<title>XMPP Messages</title>
<section id="xmpp-message-inbound-channel-adapter">
<title>Inbound Message Adapter</title>
<para>The Spring Integration adapters support receiving messages from other users in the system. To do this, the adapter "logs in" as a user
on your behalf and receives the messages sent to that user. Those messages are then forwarded to your Spring Integration
<para>The Spring Integration adapters support receiving messages from other users in the system. To do this, the
adapter "logs in" as a user
on your behalf and receives the messages sent to that user. Those messages are then forwarded to your Spring
Integration
client.
The payload of the inbound Spring Integration message may be of the raw type
<code>org.jivesoftware.smack.packet.Message</code>, or of the type <code>java.lang.String</code> - which is the type of the raw <code>
Message</code>'s <code>
body</code> property -
depending on whether you specify <code>extract-payload</code> on the adapter's configuration or not.
Inbound Messages are typically small and are text-oriented. Messages received using the adapter have
a pretty standard layout, with known headers (all headers have keys defined on <code>org.springframework.integration.xmpp.XmppHeaders</code>):
</para>
<code>org.jivesoftware.smack.packet.Message</code>, or of the type
<code>java.lang.String</code>
- which is the type of the raw<code>
Message</code>'s
<code>
body
</code>
property -
depending on whether you specify
<code>extract-payload</code>
on the adapter's configuration or not.
Inbound Messages are typically small and are text-oriented. Messages received using the adapter have
a pretty standard layout, with known headers (all headers have keys defined on<code>
org.springframework.integration.xmpp.XmppHeaders</code>):
</para>
<table>
<tr> <th> Header Name</th> <th> What it Describes</th></tr>
<tr><td>XmppHeaders.CHAT</td>
<td> A reference to the <code>org.jivesoftware.smack.Chat</code> class which represents the
threaded conversation containing the message.
</td>
</tr>
<tr> <td>XmppHeaders.TYPE</td> <td>The value of the
<table>
<title>Header Values</title>
<tgroup cols="2">
<colspec colname="c1"/>
<colspec colname="c2"/>
<thead>
<row>
<entry>Header Name</entry>
<entry>What It Describes</entry>
</row>
</thead>
<tbody>
<row>
<entry>XmppHeaders.TYPE</entry>
<entry> The value of the
the <code>
org.jivesoftware.smack.packet.Message.Type </code> enum that describes the inbound message. Possible values are:
<code>normal</code>,
<code>chat</code>,
<code>groupchat</code>,
<code>headline</code>,
<code>error</code>.
</td>
</tr>
</table>
<code>error</code>.</entry>
</row>
<row>
<entry>XmppHeaders.CHAT</entry>
<entry> A reference to the <code>org.jivesoftware.smack.Chat</code> class which represents the
threaded conversation containing the message.</entry>
</row>
</tbody>
</tgroup>
<!-- <thead>
<tr>
<th> Header Name</th> <th> What it Describes</th></tr>
<tr><td></td>
<td>
</td>
</tr>
</thead>
<tr> <td></td> <td>
</td>
</tr>-->
</table>
<para>
This adapter requires a reference to an XMPP Connection. You may
use the <link linkend="xmpp-connection">xmpp-connection</link>
element to define one.
This adapter requires a reference to an XMPP Connection. You may
use the
<link linkend="xmpp-connection">xmpp-connection</link>
element to define one.
An example might look as follows:
An example might look as follows:
<programlisting lang="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<programlisting lang="xml"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<beans:beans
xmlns="http://www.springframework.org/schema/integration"
@@ -162,8 +202,6 @@
</beans:beans>]]></programlisting>
</para>
</section>
<section id="xmpp-message-outbound-channel-adapter">