Package org.jivesoftware.smack.roster
Interface RosterLoadedListener
public interface RosterLoadedListener
Roster loaded listeners are invoked once the
Roster
was successfully loaded.
A common approach is to call
Roster.getEntriesAndAddListener(RosterListener, RosterEntries)
within
onRosterLoaded(Roster)
, to initialize or update your UI components with the current
roster state.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onRosterLoaded
(Roster roster) Called when the Roster was loaded successfully.void
onRosterLoadingFailed
(Exception exception) Called when roster loading has failed.
-
Method Details
-
onRosterLoaded
Called when the Roster was loaded successfully.- Parameters:
roster
- the Roster that was loaded successfully.
-
onRosterLoadingFailed
Called when roster loading has failed.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
SmackException.NotConnectedException
.- Parameters:
exception
- the exception which caused the failure.- Since:
- 4.2
-