public List < Jid > getOccupiedRooms ( DomainBareJid mucLightService ) throws NoResponseException , XMPPErrorException , NotConnectedException , InterruptedException { DiscoverItems result = ServiceDiscoveryManager . getInstanceFor ( connection ( ) ) . discoverItems ( mucLightService ) ; List < DiscoverItems . Item > items = result . getItems ( ) ; List < Jid > answer = new ArrayList <> ( items . size ( ) ) ; for ( DiscoverItems . Item item : items ) { Jid mucLight = item . getEntityID ( ) ; answer . add ( mucLight ) ; } return answer ; }
Returns a List of the rooms the user occupies .