• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java Decider类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中javax.batch.api.Decider的典型用法代码示例。如果您正苦于以下问题:Java Decider类的具体用法?Java Decider怎么用?Java Decider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

Decider类属于javax.batch.api包,在下文中一共展示了Decider类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: execute

点赞 2

import javax.batch.api.Decider; //导入依赖的package包/类
@Override
public ExecutionStatus execute() {
    final String deciderId = decision.getRef();
    final List<Property> propList = (decision.getProperties() == null) ? null : decision.getProperties().getPropertyList();

    //Create a decider proxy and inject the associated properties

    /* Set the contexts associated with this scope */
    //job context is always in scope
    //the parent controller will only pass one valid context to a decision controller
    //so two of these contexts will always be null
    final InjectionReferences injectionRef = new InjectionReferences(jobExecution.getJobContext(), null, propList);

    final Decider deciderProxy = ProxyFactory.createDeciderProxy(factory, deciderId, injectionRef, jobExecution);

    String exitStatus = null;
    try {
        exitStatus = deciderProxy.decide(this.previousStepExecutions);
    } catch (Exception e) {
        ExceptionConfig.wrapBatchException(e);
    }

    //Set the value returned from the decider as the job context exit status.
    this.jobExecution.getJobContext().setExitStatus(exitStatus);

    return new ExecutionStatus(ExtendedBatchStatus.NORMAL_COMPLETION, exitStatus);
}
 

开发者ID:apache,
项目名称:incubator-batchee,
代码行数:28,
代码来源:DecisionController.java

示例2: createDeciderProxy

点赞 2

import javax.batch.api.Decider; //导入依赖的package包/类
public static DeciderProxy createDeciderProxy(String id, InjectionReferences injectionRefs) throws ArtifactValidationException {
    Decider loadedArtifact = (Decider)loadArtifact(id, injectionRefs);
    DeciderProxy proxy = new DeciderProxy(loadedArtifact);

    return proxy;
}
 

开发者ID:WASdev,
项目名称:standards.jsr352.jbatch,
代码行数:7,
代码来源:ProxyFactory.java

示例3: createDeciderProxy

点赞 2

import javax.batch.api.Decider; //导入依赖的package包/类
public static Decider createDeciderProxy(final BatchArtifactFactory factory, final String id, final InjectionReferences injectionRefs,
                                              final RuntimeJobExecution execution) {
    return createProxy((Decider) loadArtifact(factory, id, injectionRefs, execution), injectionRefs);
}
 

开发者ID:apache,
项目名称:incubator-batchee,
代码行数:5,
代码来源:ProxyFactory.java

示例4: DeciderProxy

点赞 1

import javax.batch.api.Decider; //导入依赖的package包/类
DeciderProxy(Decider delegate) {
    super(delegate);

}
 

开发者ID:WASdev,
项目名称:standards.jsr352.jbatch,
代码行数:5,
代码来源:DeciderProxy.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)