public void reload ( ) { if ( ! connection . isAuthenticated ( ) ) { throw new IllegalStateException ( "Not logged in to server." ) ; } if ( connection . isAnonymous ( ) ) { throw new IllegalStateException ( "Anonymous users can't have a roster." ) ; } Roster packet = new Roster ( ) ; if ( rosterStore != null && connection . isRosterVersioningSupported ( ) ) { packet . getElement ( ) . element ( "query" ) . addAttribute ( "ver" , rosterStore . getRosterVersion ( ) ) ; PacketFilter filter = new PacketIDFilter ( packet . getID ( ) ) ; connection . addPacketListener ( new RosterResultListener ( ) , filter ) ; } connection . sendPacket ( packet ) ; }
Reloads the entire roster from the server . This is an asynchronous operation which means the method will return immediately and the roster will be reloaded at a later point when the server responds to the reload request .