mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +02:00
Re-add the login(String, String, String) method
This commit is contained in:
parent
d081055312
commit
4b77d00e91
5 changed files with 58 additions and 51 deletions
|
@ -45,7 +45,6 @@ import org.jivesoftware.smack.packet.TopLevelStreamElement;
|
|||
*/
|
||||
public class DummyConnection extends AbstractXMPPConnection {
|
||||
|
||||
private boolean anonymous = false;
|
||||
private boolean reconnect = false;
|
||||
|
||||
private String connectionID;
|
||||
|
@ -93,7 +92,6 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
connectionID = null;
|
||||
roster = null;
|
||||
authenticated = false;
|
||||
anonymous = false;
|
||||
|
||||
for (ConnectionListener listener : getConnectionListeners()) {
|
||||
listener.connectionClosed();
|
||||
|
@ -123,11 +121,6 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
return roster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAnonymous() {
|
||||
return anonymous;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSecureConnection() {
|
||||
return false;
|
||||
|
@ -139,15 +132,14 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void loginNonAnonymously()
|
||||
protected void loginNonAnonymously(String username, String password, String resource)
|
||||
throws XMPPException {
|
||||
user = config.getUsername()
|
||||
user = username
|
||||
+ "@"
|
||||
+ config.getServiceName()
|
||||
+ "/"
|
||||
+ (config.getResource() != null ? config.getResource() : "Test");
|
||||
+ (resource != null ? resource : "Test");
|
||||
roster = new Roster(this);
|
||||
anonymous = false;
|
||||
authenticated = true;
|
||||
}
|
||||
|
||||
|
@ -159,7 +151,6 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
if (isAuthenticated()) {
|
||||
throw new IllegalStateException("Already logged in to server.");
|
||||
}
|
||||
anonymous = true;
|
||||
authenticated = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue