+ The org.jivesoftware.smack.XMPPConnection class manages your connection to an XMPP
+ server. Two constructors are available. The first, XMPPConnection(String) takes
+ the server name you'd like to connect to as an argument. All default connection settings will
+ be used:
+
+
A DNS SRV lookup will be performed to find the exact address and port (typically 5222)
+ that the server resides at.
+
The maximum security possible will be negotiated with the server, including TLS encryption,
+ but the connection will fall back to lower security settings if necessary.
+
+
The XMPP resource name "Smack" will be used for the connection.
+
+
+ Alternatively, you can use the XMPPServer(ConnectionConfiguration) constructor to
+ specify advanced connection settings. Some of these settings include:
+
+
+
Manually specify the server address and port of the server rather than using a DNS SRV
+ lookup.
+
Enable connection compression.
+
Customize security settings, such as flagging the connection to require TLS encryption
+ in order to connect.
+
Specify a custom connection resource name such as "Work" or "Home". Every connection
+ by a user to a server must have a unique resource name. For the user "jsmith@example.com", the
+ full address with resource might be "jsmith@example.com/Smack". With unique resource names, a user
+ can be logged into the server from multiple locations at once, or using multiple devices. The
+ presence priority value used with each resource will determine which particular connection
+ receives messages to the bare address ("jsmith@example.com" in our example).
The XMPP protocol includes a base protocol and many optional extensions
- typically documented as "JEP's". Smack provides the org.jivesoftware.smack
+ typically documented as "XEP's". Smack provides the org.jivesoftware.smack
package for the core XMPP protocol, and the org.jivesoftware.smackx package for
many of the protocol extensions.
-Getting Started With Smack
+Smack: Getting Started
@@ -20,11 +20,24 @@ important classes and concepts.
-Requirements
+JAR Files and Requirements
-The only requirement for Smack is JDK 1.5 or later. An XML parser is embedded in the
-smack.jar file and no other third party libraries are required.
+Smack is meant to be easily embedded into any existing JDK 1.5 or later Java application.
+It has no external dependencies (except for the Jingle voice chat functionality) and is optimized
+to be as small as possible. The library ships as several JAR files to provide more flexibility
+over which features applications require:
+
+
+
smack.jar -- provides core XMPP functionality and is the only required
+ library. All XMPP features that are part of the XMPP RFCs are included.
+
smackx.jar -- support for many of the the extensions (XEPs) defined
+ by the XMPP Standards Foundation, including multi-user chat, file transfer, user search, etc.
+ The extensions are documented in the extensions manual.
+
smackx-debug.jar -- an enhanced GUI debugger for protocol traffic. It will
+ automatically be used when found in the classpath and when debugging
+ is enabled.
+
@@ -48,7 +61,8 @@ conn2.connect();
Note that maximum security will be used when connecting to the server by default (and when possible),
including use of TLS encryption. The ConnectionConfiguration class provides advanced control
- over the connection created, such as the ability to disable or require encryption.
+ over the connection created, such as the ability to disable or require encryption. See
+ Connection Management for full details.
Once you've created a connection, you should login using a username and password
with the XMPPConnection.login(String username, String password) method.
diff --git a/documentation/index.html b/documentation/index.html
index 2bfcdab7b..4fba6b56c 100644
--- a/documentation/index.html
+++ b/documentation/index.html
@@ -15,7 +15,8 @@
Provider Architecture
diff --git a/documentation/messaging.html b/documentation/messaging.html
index bf3856d15..bb98ab344 100644
--- a/documentation/messaging.html
+++ b/documentation/messaging.html
@@ -29,8 +29,7 @@ A chat creates a new thread of messages (using a thread ID) between two users. T
following code snippet demonstrates how to create a new Chat with a user and then send
them a text message:
-
// Assume we've created an XMPPConnection name
- "connection".
+
// Assume we've created an XMPPConnection name "connection".
ChatManager chatmanager = connection.getChatManager(); Chat newChat = chatmanager.createChat("jsmith@jivesoftware.com", new MessageListener() {
diff --git a/documentation/overview.html b/documentation/overview.html
index 01ae354bf..ac33e9ad9 100644
--- a/documentation/overview.html
+++ b/documentation/overview.html
@@ -16,8 +16,8 @@ Smack Overview
-Smack is a library for communicating with XMPP servers to perform
-instant messaging and chat.
+Smack is a library for communicating with XMPP servers to perform real-time communications, including
+instant messaging and group chat.
Smack Key Advantages
@@ -58,9 +58,9 @@ chat.sendMessage("Howdy!");
About XMPP
-XMPP (eXtensible Messaging and Presence Protocol) is an open, XML based protocol
-making it's way through the IETF approval process under the guidance of the
-Jabber Software Foundation (http://www.jabber.org).
+XMPP (eXtensible Messaging and Presence Protocol) is an open protocol standardized by the IETF
+and supported and extended by the XMPP Standards Foundation
+((http://www.xmpp.org).