code: public OfflineSettings getOfflineSettings() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
          OfflineSettings request = new OfflineSettings();
          request.setType(IQ.Type.get);
          request.setTo(workgroupJID);
  
          return connection.createStanzaCollectorAndSend(request).nextResultOrThrow();
      }
docs: Asks the workgroup for it's Offline Settings.
  
  @return offlineSettings the offline settings for this workgroup.
  @throws XMPPErrorException
  @throws NoResponseException
  @throws NotConnectedException
  @throws InterruptedException