Class AbstractRuleLifecycleListener

    • Constructor Detail

      • AbstractRuleLifecycleListener

        public AbstractRuleLifecycleListener()
    • Method Detail

      • beforeRuleEvaluation

        public boolean beforeRuleEvaluation​(GraphRewrite event,
                                            org.ocpsoft.rewrite.config.Rule rule,
                                            org.ocpsoft.rewrite.context.EvaluationContext context)
        Description copied from interface: RuleLifecycleListener
        Called immediately before the given Rule is executed.
        Specified by:
        beforeRuleEvaluation in interface RuleLifecycleListener
        Returns:
        true if the execution should be stopped, which is typically indicated by an underlying WindupProgressMonitor.
      • ruleEvaluationProgress

        public boolean ruleEvaluationProgress​(GraphRewrite event,
                                              String name,
                                              int currentPosition,
                                              int total,
                                              int timeRemainingInSeconds)
        Description copied from interface: RuleLifecycleListener
        This is optionally called by long-running rules to indicate their current progress and estimated time-remaining.
        Specified by:
        ruleEvaluationProgress in interface RuleLifecycleListener
        Returns:
        true if the execution should be stopped, which is typically indicated by an underlying WindupProgressMonitor.
      • beforeRuleOperationsPerformed

        public boolean beforeRuleOperationsPerformed​(GraphRewrite event,
                                                     org.ocpsoft.rewrite.context.EvaluationContext context,
                                                     org.ocpsoft.rewrite.config.Rule rule)
        Description copied from interface: RuleLifecycleListener
        Called immediately before Rule operations are performed (Only called if Condition.evaluate(org.ocpsoft.rewrite.event.Rewrite, EvaluationContext) returned true).
        Specified by:
        beforeRuleOperationsPerformed in interface RuleLifecycleListener
        Returns:
        true if the execution should be stopped, which is typically indicated by an underlying WindupProgressMonitor.
      • afterRuleOperationsPerformed

        public void afterRuleOperationsPerformed​(GraphRewrite event,
                                                 org.ocpsoft.rewrite.context.EvaluationContext context,
                                                 org.ocpsoft.rewrite.config.Rule rule)
        Description copied from interface: RuleLifecycleListener
        Called immediately after Rule operations are performed (Only called if Condition.evaluate(org.ocpsoft.rewrite.event.Rewrite, EvaluationContext) returned true).
        Specified by:
        afterRuleOperationsPerformed in interface RuleLifecycleListener
      • afterRuleExecutionFailed

        public void afterRuleExecutionFailed​(GraphRewrite event,
                                             org.ocpsoft.rewrite.context.EvaluationContext context,
                                             org.ocpsoft.rewrite.config.Rule rule,
                                             Throwable failureCause)
        Description copied from interface: RuleLifecycleListener
        Called immediately after a a Rule has thrown an exception, to indicate a failure of some kind
        Specified by:
        afterRuleExecutionFailed in interface RuleLifecycleListener
      • shouldWindupStop

        public boolean shouldWindupStop()
        Description copied from interface: RuleLifecycleListener
        Returns directly the information whether Windup execution should stop. Not all listeners need to return true - just one returning true is a reason to stop execution. Queried by various rule implementations so we can stop as soon as possible.
        Specified by:
        shouldWindupStop in interface RuleLifecycleListener