mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-16 12:12:06 +01:00
Minor tweaks.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@2038 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
cb97e13b90
commit
3e4473c6b8
4 changed files with 28 additions and 11 deletions
|
@ -59,10 +59,13 @@ new <tt>Chat</tt> or <tt>GroupChat</tt> objects.
|
||||||
<p class="subheader">
|
<p class="subheader">
|
||||||
Working with the Roster
|
Working with the Roster
|
||||||
</p>
|
</p>
|
||||||
|
The roster lets you keep track of the availability (presence) of other users. Users
|
||||||
|
can be organized into groups such as "Friends" and "Co-workers", and then you
|
||||||
|
discover whether each user is online or offline.<p>
|
||||||
|
|
||||||
Retrieve a roster using the <tt>XMPPConnection.getRoster()</tt> method. The roster
|
Retrieve the roster using the <tt>XMPPConnection.getRoster()</tt> method. The roster
|
||||||
class allows you to find all the roster entries, the groups they belong to, and the
|
class allows you to find all the roster entries, the groups they belong to, and the
|
||||||
current presence status each entry.
|
current presence status of each entry.
|
||||||
|
|
||||||
<p class="subheader">
|
<p class="subheader">
|
||||||
Reading and Writing Packets
|
Reading and Writing Packets
|
||||||
|
@ -70,12 +73,12 @@ Reading and Writing Packets
|
||||||
|
|
||||||
Each message to the XMPP server from a client is called a packet and is
|
Each message to the XMPP server from a client is called a packet and is
|
||||||
sent as XML. The <tt>org.jivesoftware.smack.packet</tt> package contains
|
sent as XML. The <tt>org.jivesoftware.smack.packet</tt> package contains
|
||||||
classes that encapsulate the different packet types allowed by XMPP (message,
|
classes that encapsulate the three different basic packet types allowed by
|
||||||
presence, and IQ). Classes such as <tt>Chat</tt> and <tt>GroupChat</tt>
|
XMPP (message, presence, and IQ). Classes such as <tt>Chat</tt> and <tt>GroupChat</tt>
|
||||||
provide higher-level constructs that manage creating and sending packets
|
provide higher-level constructs that manage creating and sending packets
|
||||||
automatically, but you can also create and send packets directly. Below
|
automatically, but you can also create and send packets directly. Below
|
||||||
is a code example for changing our presence to let people know we're unavailable
|
is a code example for changing your presence to let people know you're unavailable
|
||||||
because we're "out fishing":<p>
|
and "out fishing":<p>
|
||||||
|
|
||||||
<div class="code">
|
<div class="code">
|
||||||
<pre>
|
<pre>
|
||||||
|
@ -94,8 +97,8 @@ while a packet collector has a result queue of packets that you can do
|
||||||
polling and blocking operations on. So, a packet listener is useful when
|
polling and blocking operations on. So, a packet listener is useful when
|
||||||
you want to take some action whenever a packet happens to come in, while a
|
you want to take some action whenever a packet happens to come in, while a
|
||||||
packet collector is useful when you want to wait for a specific packet
|
packet collector is useful when you want to wait for a specific packet
|
||||||
to come through. Packet collectors and listeners can be created using the
|
to arrive. Packet collectors and listeners can be created using an
|
||||||
connection object.
|
XMPPConnection instance.
|
||||||
|
|
||||||
|
|
||||||
<p><div class="footer">
|
<p><div class="footer">
|
||||||
|
|
|
@ -58,6 +58,14 @@ For a good overview of the protocol, read the first chapter of <u>Instant Messag
|
||||||
in Java</u>, available free at
|
in Java</u>, available free at
|
||||||
<a href="http://www.jivesoftware.com/products/messenger/book/">http://www.jivesoftware.com/products/messenger/book/</a>
|
<a href="http://www.jivesoftware.com/products/messenger/book/">http://www.jivesoftware.com/products/messenger/book/</a>
|
||||||
|
|
||||||
|
<p class="subheader">
|
||||||
|
How To Use This Documentation
|
||||||
|
</p>
|
||||||
|
|
||||||
|
This documentation assumes that you're already familiar with the main features of XMPP
|
||||||
|
instant messaging. It's also highly recommended that you open the Javadoc API guide and
|
||||||
|
use that as a reference while reading through this documentation.
|
||||||
|
|
||||||
<br clear="all" /><br><br>
|
<br clear="all" /><br><br>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
Copyright © Jive Software 2002-2003
|
Copyright © Jive Software 2002-2003
|
||||||
|
|
|
@ -27,7 +27,7 @@ A packet listener is used for event style programming, while a packet collector
|
||||||
result queue of packets that you can do polling and blocking operations on. So, a packet
|
result queue of packets that you can do polling and blocking operations on. So, a packet
|
||||||
listener is useful when you want to take some action whenever a packet happens to come in,
|
listener is useful when you want to take some action whenever a packet happens to come in,
|
||||||
while a packet collector is useful when you want to wait for a specific packet to come
|
while a packet collector is useful when you want to wait for a specific packet to come
|
||||||
through. Packet collectors and listeners can be created using an <tt>XMPPConnection</tt> object.<p>
|
arrive. Packet collectors and listeners can be created using an <tt>XMPPConnection</tt> instance.<p>
|
||||||
|
|
||||||
The <tt>org.jivesoftware.smack.filter.PacketFilter</tt> interface determines which
|
The <tt>org.jivesoftware.smack.filter.PacketFilter</tt> interface determines which
|
||||||
specific packets will be delivered to a <tt>PacketCollector</tt> or <tt>PacketListener</tt>.
|
specific packets will be delivered to a <tt>PacketCollector</tt> or <tt>PacketListener</tt>.
|
||||||
|
@ -76,8 +76,9 @@ to the <tt>PacketFilter</tt> interface. The default set of filters includes:
|
||||||
<li> <tt>NotFilter</tt> -- implements the logical NOT operation on a filter.
|
<li> <tt>NotFilter</tt> -- implements the logical NOT operation on a filter.
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<br clear="all" /><br><br>
|
|
||||||
|
|
||||||
|
|
||||||
|
<br clear="all" /><br><br>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
Copyright © Jive Software 2002-2003
|
Copyright © Jive Software 2002-2003
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,7 +16,12 @@ Roster and Presence
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
<i>Content to be added.</i>
|
The roster lets you keep track of the availability (presence) of other users. Users
|
||||||
|
can be organized into groups such as "Friends" and "Co-workers", and then you
|
||||||
|
discover whether each user is online or offline.<p>
|
||||||
|
|
||||||
|
A <tt>Roster</tt> instance is obtained using the <tt>XMPPConnection.getRoster()</tt>
|
||||||
|
method, but only after
|
||||||
|
|
||||||
<br clear="all" /><br><br>
|
<br clear="all" /><br><br>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue