类 ExecutionContextPromotionListener

  • 所有已实现的接口:
    StepExecutionListener, StepListener, org.springframework.beans.factory.InitializingBean

    public class ExecutionContextPromotionListener
    extends StepExecutionListenerSupport
    implements org.springframework.beans.factory.InitializingBean
    This class can be used to automatically promote items from the StepExecutionContext to the JobExecutionContext at the end of a step. A list of keys should be provided that correspond to the items in the StepExecutionContext that should be promoted. Additionally, an optional list of statuses can be set to indicate for which exit status codes the promotion should occur. These statuses will be checked using the PatternMatcher, so wildcards are allowed. By default, promotion will only occur for steps with an exit code of "COMPLETED".
    从以下版本开始:
    2.0
    作者:
    Dan Garrette
    • 方法详细资料

      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws java.lang.Exception
        指定者:
        afterPropertiesSet 在接口中 org.springframework.beans.factory.InitializingBean
        抛出:
        java.lang.Exception
      • setKeys

        public void setKeys​(java.lang.String[] keys)
        参数:
        keys - A list of keys corresponding to items in the StepExecutionContext that must be promoted.
      • setStatuses

        public void setStatuses​(java.lang.String[] statuses)
        参数:
        statuses - A list of statuses for which the promotion should occur. Statuses can may contain wildcards recognizable by a PatternMatcher.
      • setStrict

        public void setStrict​(boolean strict)
        If set to TRUE, the listener will throw an exception if any 'key' is not found in the Step ExecutionContext. FALSE by default.
        参数:
        strict - boolean the value of the flag.