mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Add "Roster loading failed" callback
This commit is contained in:
parent
45feaecdf7
commit
feff081547
2 changed files with 16 additions and 0 deletions
|
@ -404,6 +404,9 @@ public final class Roster extends Manager {
|
|||
logLevel = Level.SEVERE;
|
||||
}
|
||||
LOGGER.log(logLevel, "Exception reloading roster" , exception);
|
||||
for (RosterLoadedListener listener : rosterLoadedListeners) {
|
||||
listener.onRosterLoadingFailed(exception);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -35,4 +35,17 @@ public interface RosterLoadedListener {
|
|||
*/
|
||||
public void onRosterLoaded(Roster roster);
|
||||
|
||||
/**
|
||||
* Called when roster loading has failed.
|
||||
* <p>
|
||||
* Note that the reason for the failure could be as trivial as the connection being not
|
||||
* connected, in which case the exception will be a
|
||||
* {@link org.jivesoftware.smack.SmackException.NotConnectedException}.
|
||||
* </p>
|
||||
*
|
||||
* @param exception the exception which caused the failure.
|
||||
* @since 4.2
|
||||
*/
|
||||
public void onRosterLoadingFailed(Exception exception);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue