当前位置: 首页>>代码示例>>Java>>正文


Java ItemProcessor类代码示例

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


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

示例1: createItemProcessorProxy

import javax.batch.api.chunk.ItemProcessor; //导入依赖的package包/类
public static ItemProcessorProxy createItemProcessorProxy(String id, InjectionReferences injectionRefs, StepContextImpl stepContext) throws ArtifactValidationException {
    ItemProcessor loadedArtifact = (ItemProcessor)loadArtifact(id, injectionRefs);
    ItemProcessorProxy proxy = new ItemProcessorProxy(loadedArtifact);
    proxy.setStepContext(stepContext);
    
    return proxy;
}
 
开发者ID:WASdev,项目名称:standards.jsr352.jbatch,代码行数:8,代码来源:ProxyFactory.java

示例2: initializeUI

import javax.batch.api.chunk.ItemProcessor; //导入依赖的package包/类
@Override
public void initializeUI(UIBuilder builder) throws Exception {
	reader.setCompleter(new BatchUICompleter(AbstractItemReader.class,
			ItemReader.class));
	processor.setCompleter(new BatchUICompleter(null, ItemProcessor.class));
	writer.setCompleter(new BatchUICompleter(AbstractItemWriter.class,
			ItemWriter.class));
	
	reader.addValidator(new NamedValidator());
	processor.addValidator(new NamedValidator());
	writer.addValidator(new NamedValidator());

	jobXML.addValidator(new UIValidator() {

		@Override
		public void validate(UIValidationContext context) {
			String jobXMLName = ((String)context.getCurrentInputComponent().getValue());
			
			FileResource<?> resource = getJobXMLResource(context.getUIContext(),
					jobXMLName);
			if (resource.exists()) {
				context.addValidationError(context.getCurrentInputComponent(), resource.getFullyQualifiedName() + " already exists");
			}
		}

	});
	builder.add(jobXML).add(reader).add(processor).add(writer);
}
 
开发者ID:javaee-samples,项目名称:forge-addons,代码行数:29,代码来源:BatchNewJobXmlCommand.java

示例3: processItem

import javax.batch.api.chunk.ItemProcessor; //导入依赖的package包/类
@Override
public Object processItem(final Object item) throws Exception {
    groovyInstance = Groovys.newInstance(ItemProcessor.class, scriptPath, jobContext, stepContext);
    delegate = groovyInstance.getInstance();
    try {
        return delegate.processItem(item);
    } finally {
        groovyInstance.release();
    }
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:11,代码来源:GroovyItemProcessor.java

示例4: ItemProcessorProxy

import javax.batch.api.chunk.ItemProcessor; //导入依赖的package包/类
ItemProcessorProxy(ItemProcessor delegate) { 
	super(delegate);
}
 
开发者ID:WASdev,项目名称:standards.jsr352.jbatch,代码行数:4,代码来源:ItemProcessorProxy.java

示例5: createItemProcessorProxy

import javax.batch.api.chunk.ItemProcessor; //导入依赖的package包/类
public static ItemProcessor createItemProcessorProxy(final BatchArtifactFactory factory, final String id, final InjectionReferences injectionRefs,
                                                     final RuntimeJobExecution execution) {
    final ItemProcessor loadedArtifact = (ItemProcessor) loadArtifact(factory, id, injectionRefs, execution);
    return createProxy(loadedArtifact, injectionRefs, "processItem");
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:6,代码来源:ProxyFactory.java

示例6: invoke

import javax.batch.api.chunk.ItemProcessor; //导入依赖的package包/类
@Override
protected Object invoke(final BeanLocator.LocatorInstance<ItemProcessor> next, final Object current) throws Exception {
    return next.getValue().processItem(current);
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:5,代码来源:CamelChainItemProcessor.java

示例7: getDelegate

import javax.batch.api.chunk.ItemProcessor; //导入依赖的package包/类
protected ItemProcessor getDelegate() { // note with cdi delegate scope shouldn't need cleanup
    if (delegate == null) {
        delegate = BeanLocator.Finder.get(locator).newInstance(ItemProcessor.class, delegateRef).getValue();
    }
    return delegate;
}
 
开发者ID:apache,项目名称:incubator-batchee,代码行数:7,代码来源:AsynchronousItemProcessor.java


注:本文中的javax.batch.api.chunk.ItemProcessor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。