1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 10:49:41 +02:00

Added reconnection support. SMACK-172

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@5367 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Gaston Dombiak 2006-09-14 19:16:40 +00:00 committed by gato
parent 96e4201f61
commit 3af86fd462
22 changed files with 501 additions and 194 deletions

View file

@ -68,14 +68,14 @@ public class SASLAuthentication implements UserAuthentication {
/**
* Boolean indicating if SASL negotiation has finished and was successful.
*/
private boolean saslNegotiated = false;
private boolean saslNegotiated;
/**
* Boolean indication if SASL authentication has failed. When failed the server may end
* the connection.
*/
private boolean saslFailed = false;
private boolean resourceBinded = false;
private boolean sessionSupported = false;
private boolean saslFailed;
private boolean resourceBinded;
private boolean sessionSupported;
static {
// Register SASL mechanisms supported by Smack
@ -126,6 +126,7 @@ public class SASLAuthentication implements UserAuthentication {
SASLAuthentication(XMPPConnection connection) {
super();
this.connection = connection;
this.init();
}
/**
@ -413,4 +414,16 @@ public class SASLAuthentication implements UserAuthentication {
void sessionsSupported() {
sessionSupported = true;
}
/**
* Initializes the internal state in order to be able to be reused. The authentication
* is used by the connection at the first login and then reused after the connection
* is disconnected and then reconnected.
*/
protected void init() {
saslNegotiated = false;
saslFailed = false;
resourceBinded = false;
sessionSupported = false;
}
}