code: private void reset(DiscoveryRequest req, DiscoveryListener callback) {
      this.callback = callback;
      this.state = State.ACTIVE;
      this.requests = new ArrayList<DiscoveryRequest>();
      if (req != null) {
        requests.add(req);
      }
      // Lazily Remove expired entries
      for (Map.Entry<String, SsdpService> e : this.cache.entrySet()) {
        if (e.getValue().isExpired()) {
          this.cache.remove(e.getKey());
        } else {
          // Notify entry which is non expired
          callback.onServiceDiscovered(e.getValue());
        }
      }
    }
docs: Reset all stateful attributes.
  
  @param req      the new discovery request
  @param callback the callback