code: public GenericSettings getGenericSettings(XMPPConnection con, String query) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          GenericSettings setting = new GenericSettings();
          setting.setType(IQ.Type.get);
          setting.setTo(workgroupJID);
  
          GenericSettings response = connection.createStanzaCollectorAndSend(
                          setting).nextResultOrThrow();
          return response;
      }
docs: Returns the generic metadata of the workgroup the agent belongs to.
  
  @param con   the XMPPConnection to use.
  @param query an optional query object used to tell the server what metadata to retrieve. This can be null.
  @return the settings for the workgroup.
  @throws XMPPErrorException if an error occurs while sending the request to the server.
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException