public OccupantsInfo getOccupantsInfo(String roomID) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException  {
        OccupantsInfo request = new OccupantsInfo(roomID);
        request.setType(IQ.Type.get);
        request.setTo(workgroupJID);

        OccupantsInfo response = (OccupantsInfo) connection.createStanzaCollectorAndSend(request).nextResultOrThrow();
        return response;
    }
public OccupantsInfo getOccupantsInfo ( String roomID ) throws NoResponseException , XMPPErrorException , NotConnectedException , InterruptedException { OccupantsInfo request = new OccupantsInfo ( roomID ) ; request . setType ( IQ . Type . get ) ; request . setTo ( workgroupJID ) ; OccupantsInfo response = ( OccupantsInfo ) connection . createStanzaCollectorAndSend ( request ) . nextResultOrThrow ( ) ; return response ; }
Asks the workgroup for information about the occupants of the specified room. The returned
information will include the real JID of the occupants, the nickname of the user in the
room as well as the date when the user joined the room.

@param roomID the room to get information about its occupants.
@return information about the occupants of the specified room.
@throws XMPPErrorException
@throws NoResponseException
@throws NotConnectedException
@throws InterruptedException