@NotNull
  CancellablePromise<?> handle(@NotNull ServiceEvent e) {
    Runnable handler = () -> {
      LOG.debug("Handle event: " + e);
      switch (e.type) {
        case SERVICE_ADDED -> addService(e);
        case SERVICE_REMOVED -> removeService(e);
        case SERVICE_CHANGED -> serviceChanged(e);
        case SERVICE_CHILDREN_CHANGED -> serviceChildrenChanged(e);
        case SERVICE_STRUCTURE_CHANGED -> serviceStructureChanged(e);
        case SERVICE_GROUP_CHANGED -> serviceGroupChanged(e);
        case GROUP_CHANGED -> groupChanged(e);
        default -> reset(e.contributorClass);
      }
      notifyListeners(e);
      LOG.debug("Event handled: " + e);
    };
    if (e.type != ServiceEventListener.EventType.UNLOAD_SYNC_RESET) {
      return getInvoker().invokeLater(handler);
    }
    handler.run();
    return Promises.resolvedCancellablePromise(null);
  }
@NotNull
  CancellablePromise<?> handle(@NotNull ServiceEvent e)