mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-10 04:51:08 +01:00
Move getRoster() to XMPPConnection
Also remove the Exceptions from the signature of getRoster(). Extend ConnectionListener with connected() and authenticated() callbacks, required by Roster to be notified so that the Roster can be loaded *after* login.
This commit is contained in:
parent
4b56446e40
commit
64e7b8a868
15 changed files with 193 additions and 260 deletions
|
|
@ -117,16 +117,7 @@ class PacketReader {
|
|||
public void shutdown() {
|
||||
// Notify connection listeners of the connection closing if done hasn't already been set.
|
||||
if (!done) {
|
||||
for (ConnectionListener listener : connection.getConnectionListeners()) {
|
||||
try {
|
||||
listener.connectionClosed();
|
||||
}
|
||||
catch (Exception e) {
|
||||
// Catch and print any exception so we can recover
|
||||
// from a faulty listener and finish the shutdown process
|
||||
LOGGER.log(Level.SEVERE, "Error in listener while closing connection", e);
|
||||
}
|
||||
}
|
||||
connection.callConnectionClosedListener();
|
||||
}
|
||||
done = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue