mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-12-08 14:11:07 +01: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
|
|
@ -143,6 +143,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
*/
|
||||
protected String user;
|
||||
|
||||
protected boolean connected = false;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -283,18 +285,9 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
return port;
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract String getUser();
|
||||
|
||||
@Override
|
||||
public abstract String getConnectionID();
|
||||
|
||||
@Override
|
||||
public abstract boolean isConnected();
|
||||
|
||||
@Override
|
||||
public abstract boolean isAuthenticated();
|
||||
|
||||
@Override
|
||||
public abstract boolean isSecureConnection();
|
||||
|
||||
|
|
@ -405,6 +398,22 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
*/
|
||||
public abstract void loginAnonymously() throws XMPPException, SmackException, IOException;
|
||||
|
||||
|
||||
@Override
|
||||
public final boolean isConnected() {
|
||||
return connected;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isAuthenticated() {
|
||||
return authenticated;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getUser() {
|
||||
return user;
|
||||
}
|
||||
|
||||
protected void bindResourceAndEstablishSession(String resource) throws XMPPErrorException,
|
||||
IOException, SmackException {
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue