1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 09:39:39 +02:00

SMACK-279: The XMPPConnection extends the new abstract Connection class

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@11613 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Günther Niess 2010-02-09 11:55:56 +00:00 committed by niess
parent 11a41e79ca
commit 127319a821
102 changed files with 1420 additions and 1194 deletions

View file

@ -22,7 +22,7 @@ package org.jivesoftware.smackx.packet;
import org.jivesoftware.smack.PacketCollector;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.Connection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.filter.PacketIDFilter;
import org.jivesoftware.smack.packet.IQ;
@ -493,10 +493,10 @@ public class VCard extends IQ {
* <p/>
* NOTE: the method is asynchronous and does not wait for the returned value.
*
* @param connection the XMPPConnection to use.
* @param connection the Connection to use.
* @throws XMPPException thrown if there was an issue setting the VCard in the server.
*/
public void save(XMPPConnection connection) throws XMPPException {
public void save(Connection connection) throws XMPPException {
checkAuthenticated(connection, true);
setType(IQ.Type.SET);
@ -520,7 +520,7 @@ public class VCard extends IQ {
* Load VCard information for a connected user. Connection should be authenticated
* and not anonymous.
*/
public void load(XMPPConnection connection) throws XMPPException {
public void load(Connection connection) throws XMPPException {
checkAuthenticated(connection, true);
setFrom(connection.getUser());
@ -530,14 +530,14 @@ public class VCard extends IQ {
/**
* Load VCard information for a given user. Connection should be authenticated and not anonymous.
*/
public void load(XMPPConnection connection, String user) throws XMPPException {
public void load(Connection connection, String user) throws XMPPException {
checkAuthenticated(connection, false);
setTo(user);
doLoad(connection, user);
}
private void doLoad(XMPPConnection connection, String user) throws XMPPException {
private void doLoad(Connection connection, String user) throws XMPPException {
setType(Type.GET);
PacketCollector collector = connection.createPacketCollector(
new PacketIDFilter(getPacketID()));
@ -587,7 +587,7 @@ public class VCard extends IQ {
}
}
private void checkAuthenticated(XMPPConnection connection, boolean checkForAnonymous) {
private void checkAuthenticated(Connection connection, boolean checkForAnonymous) {
if (connection == null) {
throw new IllegalArgumentException("No connection was provided");
}