Fix documentation to use correct XMPPConnection names

Some parts of the documentation still refer to

Connection connection = new XMPPConnection(…)

when it should be

XMPPConnection connection = new XMPPTCPConnection(…)

SMACK-574
This commit is contained in:
Florian Schmaus 2014-06-11 16:20:24 +02:00
parent 1de2da8ec4
commit 3d926a034c
3 changed files with 8 additions and 8 deletions

View File

@ -20,8 +20,8 @@
<p>
The <tt>org.jivesoftware.smack.XMPPConnection</tt> class manages your connection to an XMPP
server. The default implementation is the <tt>org.jivesoftware.smack.XMPPConnection</tt>
class. Two constructors are mainly used. The first, <tt>XMPPConnection(String)</tt> takes
server. The default implementation is the <tt>org.jivesoftware.smack.XMPPTCPConnection</tt>
class. Two constructors are mainly used. The first, <tt>XMPPTCPConnection(String)</tt> takes
the server name you'd like to connect to as an argument. All default connection settings will
be used:
<ul>
@ -33,7 +33,7 @@
<li>The XMPP resource name "Smack" will be used for the connection.</li>
</ul>
Alternatively, you can use the <tt>XMPPServer(ConnectionConfiguration)</tt> constructor to
Alternatively, you can use the <tt>XMPPTCPConnection(ConnectionConfiguration)</tt> constructor to
specify advanced connection settings. Some of these settings include:
<ul>
@ -63,7 +63,7 @@ ConnectionConfiguration config = new ConnectionConfiguration(<font color="green"
config.setCompressionEnabled(true);
config.setSASLAuthenticationEnabled(true);
Connection connection = new XMPPConnection(config);
XMPPConnection connection = new XMPPTCPConnection(config);
<font color="gray"><i>// Connect to the server</i></font>
connection.connect();
<font color="gray"><i>// Log into the server</i></font>

View File

@ -76,18 +76,18 @@ list of initializers.
Establishing a Connection
</p>
The <tt>XMPPConnection</tt> class is used to create a connection to an
The <tt>XMPPTCPConnection</tt> class is used to create a connection to an
XMPP server. Below are code examples for making a connection:<p>
<div class="code">
<pre>
<font color="gray"><i>// Create a connection to the jabber.org server.</i></font>
Connection conn1 = <font color="navy"><b>new</b></font> XMPPConnection(<font color="green">"jabber.org"</font>);
XMPPConnection conn1 = <font color="navy"><b>new</b></font> XMPPTCPConnection(<font color="green">"jabber.org"</font>);
conn1.connect();
<font color="gray"><i>// Create a connection to the jabber.org server on a specific port.</i></font>
ConnectionConfiguration config = new ConnectionConfiguration(<font color="green">"jabber.org"</font>, 5222);
Connection conn2 = <font color="navy"><b>new</b></font> XMPPConnection(config);
XMPPConnection conn2 = <font color="navy"><b>new</b></font> XMPPTCPConnection(config);
conn2.connect();
</pre></div>

View File

@ -28,7 +28,7 @@ Smack Key Advantages
can be accomplished in only a few lines of code:
<div class="code"><pre>
Connection connection = <font color="navy"><b>new</b></font> XMPPConnection(<font color="green">"jabber.org"</font>);
XMPPConnection connection = <font color="navy"><b>new</b></font> XMPPTCPConnection(<font color="green">"jabber.org"</font>);
connection.connect();
connection.login(<font color="green">"mtucker"</font>, <font color="green">"password"</font>);
Chat chat = connection.getChatManager().createChat(<font color="green">"jsmith@jivesoftware.com"</font>, new MessageListener() {