mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 09:39:39 +02:00
Move is(Connected|Authenticated) and getUser()
into AbstractXMPPConnection. Also remove wasAuthenticated field from XMPPBOSHConnection, it is already in AbstractXMPPConnection.
This commit is contained in:
parent
6fec813ec0
commit
5647cac39c
4 changed files with 20 additions and 63 deletions
|
@ -45,11 +45,9 @@ import org.jivesoftware.smack.packet.TopLevelStreamElement;
|
|||
*/
|
||||
public class DummyConnection extends AbstractXMPPConnection {
|
||||
|
||||
private boolean authenticated = false;
|
||||
private boolean anonymous = false;
|
||||
private boolean reconnect = false;
|
||||
|
||||
private String user;
|
||||
private String connectionID;
|
||||
private Roster roster;
|
||||
|
||||
|
@ -65,6 +63,8 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
for (ConnectionCreationListener listener : XMPPConnectionRegistry.getConnectionCreationListeners()) {
|
||||
listener.connectionCreated(this);
|
||||
}
|
||||
connected = true;
|
||||
user = "dummy@" + config.getServiceName() + "/Test";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,29 +114,11 @@ public class DummyConnection extends AbstractXMPPConnection {
|
|||
return roster;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUser() {
|
||||
if (user == null) {
|
||||
user = "dummy@" + config.getServiceName() + "/Test";
|
||||
}
|
||||
return user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAnonymous() {
|
||||
return anonymous;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAuthenticated() {
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isConnected() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSecureConnection() {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue