mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 03:52:06 +01:00
Javadoc fixes
- Add hint to reconnection configuration - s/connection.getChatManager/ChatManager.getInstanceFor(connection) - typos
This commit is contained in:
parent
0136c3eb81
commit
b4eb8ad182
3 changed files with 25 additions and 23 deletions
|
@ -353,22 +353,24 @@ public class ConnectionConfiguration implements Cloneable {
|
|||
/**
|
||||
* Sets if the reconnection mechanism is allowed to be used. By default
|
||||
* reconnection is allowed.
|
||||
*
|
||||
* @param isAllowed if the reconnection mechanism is allowed to use.
|
||||
*
|
||||
* @param isAllowed if the reconnection mechanism should be enabled for this connection.
|
||||
*/
|
||||
public void setReconnectionAllowed(boolean isAllowed) {
|
||||
this.reconnectionAllowed = isAllowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns if the reconnection mechanism is allowed to be used. By default
|
||||
* reconnection is allowed.
|
||||
* Returns if the reconnection mechanism is allowed to be used. By default reconnection is
|
||||
* allowed. You can disable the reconnection mechanism with {@link
|
||||
* #setReconnectionAllowed(boolean)}.
|
||||
*
|
||||
* @return if the reconnection mechanism is allowed to be used.
|
||||
* @return true, if the reconnection mechanism is enabled.
|
||||
*/
|
||||
public boolean isReconnectionAllowed() {
|
||||
return this.reconnectionAllowed;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the socket factory used to create new xmppConnection sockets.
|
||||
* This is useful when connecting through SOCKS5 proxies.
|
||||
|
|
|
@ -23,7 +23,7 @@ import java.util.Random;
|
|||
import java.util.logging.Logger;
|
||||
/**
|
||||
* Handles the automatic reconnection process. Every time a connection is dropped without
|
||||
* the application explictly closing it, the manager automatically tries to reconnect to
|
||||
* the application explicitly closing it, the manager automatically tries to reconnect to
|
||||
* the server.<p>
|
||||
*
|
||||
* The reconnection mechanism will try to reconnect periodically:
|
||||
|
@ -115,7 +115,7 @@ public class ReconnectionManager extends AbstractConnectionListener {
|
|||
|
||||
/**
|
||||
* The process will try the reconnection until the connection succeed or the user
|
||||
* cancell it
|
||||
* cancel it
|
||||
*/
|
||||
public void run() {
|
||||
// The process will try to reconnect until the connection is established or
|
||||
|
|
|
@ -53,12 +53,12 @@ import org.jivesoftware.smack.packet.Packet;
|
|||
import org.jivesoftware.smack.packet.Presence;
|
||||
|
||||
/**
|
||||
* The abstract XMPPConnection class provides an interface for connections to a
|
||||
* XMPP server and implements shared methods which are used by the
|
||||
* different types of connections (e.g. XMPPTCPConnection or XMPPBOSHConnection).
|
||||
* The abstract XMPPConnection class provides an interface for connections to a XMPP server and
|
||||
* implements shared methods which are used by the different types of connections (e.g.
|
||||
* {@link XMPPTCPConnection} or {@link XMPPBOSHConnection}). To create a connection to a XMPP server
|
||||
* a simple usage of this API might look like the following:
|
||||
* <p>
|
||||
*
|
||||
* To create a connection to a XMPP server a simple usage of this API might
|
||||
* look like the following:
|
||||
* <pre>
|
||||
* // Create a connection to the igniterealtime.org XMPP server.
|
||||
* XMPPConnection con = new XMPPTCPConnection("igniterealtime.org");
|
||||
|
@ -67,8 +67,7 @@ import org.jivesoftware.smack.packet.Presence;
|
|||
* // Most servers require you to login before performing other tasks.
|
||||
* con.login("jsmith", "mypass");
|
||||
* // Start a new conversation with John Doe and send him a message.
|
||||
* Chat chat = connection.getChatManager().createChat("jdoe@igniterealtime.org"</font>, new MessageListener() {
|
||||
* <p/>
|
||||
* Chat chat = ChatManager.getInstanceFor(con).createChat(<font color="green">"jdoe@igniterealtime.org"</font>, new MessageListener() {
|
||||
* public void processMessage(Chat chat, Message message) {
|
||||
* // Print out any messages we get back to standard out.
|
||||
* System.out.println(<font color="green">"Received message: "</font> + message);
|
||||
|
@ -78,14 +77,15 @@ import org.jivesoftware.smack.packet.Presence;
|
|||
* // Disconnect from the server
|
||||
* con.disconnect();
|
||||
* </pre>
|
||||
* <p/>
|
||||
* Connections can be reused between connections. This means that an Connection
|
||||
* may be connected, disconnected and then connected again. Listeners of the Connection
|
||||
* will be retained accross connections.<p>
|
||||
* <p/>
|
||||
* If a connected XMPPConnection gets disconnected abruptly then it will try to reconnect
|
||||
* again. To stop the reconnection process, use {@link #disconnect()}. Once stopped
|
||||
* you can use {@link #connect()} to manually connect to the server.
|
||||
* <p>
|
||||
* Connections can be reused between connections. This means that an Connection may be connected,
|
||||
* disconnected and then connected again. Listeners of the Connection will be retained accross
|
||||
* connections.
|
||||
* <p>
|
||||
* If a connected XMPPConnection gets disconnected abruptly and automatic reconnection is enabled (
|
||||
* {@link ConnectionConfiguration#isReconnectionAllowed()}, the default), then it will try to
|
||||
* reconnect again. To stop the reconnection process, use {@link #disconnect()}. Once stopped you
|
||||
* can use {@link #connect()} to manually connect to the server.
|
||||
*
|
||||
* @author Matt Tucker
|
||||
* @author Guenther Niess
|
||||
|
|
Loading…
Reference in a new issue