code: public ListenerRegistration<RuleLifecycleListener> addLifecycleListener(final RuleLifecycleListener listener)
      {
          this.listeners.add(listener);
          return new ListenerRegistration<RuleLifecycleListener>()
          {
              @Override
              public RuleLifecycleListener removeListener()
              {
                  listeners.remove(listener);
                  return listener;
              }
          };
  
      }
docs: Add a {@link RuleLifecycleListener} to receive events when {@link Rule} instances are evaluated, executed, and their results.