code: private void handleDiscoveryResponse(SsdpResponse response) {
      SsdpService ssdpService = response.toService();
      if (ssdpService.getSerialNumber() == null) {
        callback.onFailed(new NoSerialNumberException());
        return;
      }
      if (!cache.containsKey(ssdpService.getSerialNumber())) {
        callback.onServiceDiscovered(ssdpService);
      }
      cache.put(ssdpService.getSerialNumber(), ssdpService);
    }
docs: Handle discovery response Datagrams.
  
  @param response the incoming response