Package org.jboss.windup.config
Interface RuleLifecycleListener
-
- All Known Implementing Classes:
AbstractRuleLifecycleListener,ProjectTraversalCache
public interface RuleLifecycleListenerReceives events fromRuleSubsetduring execution.- Author:
- Lincoln Baxter, III, Ondrej Zizka
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidafterExecution(GraphRewrite event)Called immediately after anyRuleinstances are executed.voidafterRuleConditionEvaluation(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule, boolean result)Called immediately after execution of the eachRule.voidafterRuleExecutionFailed(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule, Throwable failureCause)Called immediately after a aRulehas thrown an exception, to indicate a failure of some kindvoidafterRuleOperationsPerformed(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule)Called immediately afterRuleoperations are performed (Only called ifCondition.evaluate(org.ocpsoft.rewrite.event.Rewrite, EvaluationContext)returnedtrue).voidbeforeExecution(GraphRewrite event)Called immediately before anyRuleinstances are executed.booleanbeforeRuleEvaluation(GraphRewrite event, org.ocpsoft.rewrite.config.Rule rule, org.ocpsoft.rewrite.context.EvaluationContext context)Called immediately before the givenRuleis executed.booleanbeforeRuleOperationsPerformed(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule)Called immediately beforeRuleoperations are performed (Only called ifCondition.evaluate(org.ocpsoft.rewrite.event.Rewrite, EvaluationContext)returnedtrue).booleanruleEvaluationProgress(GraphRewrite event, String name, int currentPosition, int total, int timeRemainingInSeconds)This is optionally called by long-running rules to indicate their current progress and estimated time-remaining.default booleanshouldWindupStop()Returns directly the information whether Windup execution should stop.
-
-
-
Method Detail
-
beforeExecution
void beforeExecution(GraphRewrite event)
Called immediately before anyRuleinstances are executed.
-
beforeRuleEvaluation
boolean beforeRuleEvaluation(GraphRewrite event, org.ocpsoft.rewrite.config.Rule rule, org.ocpsoft.rewrite.context.EvaluationContext context)
Called immediately before the givenRuleis executed.- Returns:
- true if the execution should be stopped, which is typically indicated by an underlying
WindupProgressMonitor.
-
ruleEvaluationProgress
boolean ruleEvaluationProgress(GraphRewrite event, String name, int currentPosition, int total, int timeRemainingInSeconds)
This is optionally called by long-running rules to indicate their current progress and estimated time-remaining.- Returns:
- true if the execution should be stopped, which is typically indicated by an underlying
WindupProgressMonitor.
-
afterRuleConditionEvaluation
void afterRuleConditionEvaluation(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule, boolean result)
Called immediately after execution of the eachRule.
-
beforeRuleOperationsPerformed
boolean beforeRuleOperationsPerformed(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule)
Called immediately beforeRuleoperations are performed (Only called ifCondition.evaluate(org.ocpsoft.rewrite.event.Rewrite, EvaluationContext)returnedtrue).- Returns:
- true if the execution should be stopped, which is typically indicated by an underlying
WindupProgressMonitor.
-
afterRuleOperationsPerformed
void afterRuleOperationsPerformed(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule)
Called immediately afterRuleoperations are performed (Only called ifCondition.evaluate(org.ocpsoft.rewrite.event.Rewrite, EvaluationContext)returnedtrue).
-
afterRuleExecutionFailed
void afterRuleExecutionFailed(GraphRewrite event, org.ocpsoft.rewrite.context.EvaluationContext context, org.ocpsoft.rewrite.config.Rule rule, Throwable failureCause)
Called immediately after a aRulehas thrown an exception, to indicate a failure of some kind
-
afterExecution
void afterExecution(GraphRewrite event)
Called immediately after anyRuleinstances are executed.
-
shouldWindupStop
default boolean shouldWindupStop()
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.
-
-