本文整理汇总了Java中org.springframework.batch.core.ItemProcessListener类的典型用法代码示例。如果您正苦于以下问题:Java ItemProcessListener类的具体用法?Java ItemProcessListener怎么用?Java ItemProcessListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ItemProcessListener类属于org.springframework.batch.core包,在下文中一共展示了ItemProcessListener类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupMock
import org.springframework.batch.core.ItemProcessListener; //导入依赖的package包/类
@Before
public void setupMock() {
when(taskletStep.getTasklet()).thenReturn(
new ChunkOrientedTasklet(chunkProvider, chunkProcessor));
when(taskletStep.getName()).thenReturn("FOOOBAR");
registerAlias(ItemProcessListener.class, BatchEventAutoConfiguration.ITEM_PROCESS_EVENTS_LISTENER);
registerAlias(StepExecutionListener.class, BatchEventAutoConfiguration.STEP_EXECUTION_EVENTS_LISTENER);
registerAlias(ChunkListener.class, BatchEventAutoConfiguration.CHUNK_EVENTS_LISTENER);
registerAlias(ItemReadListener.class, BatchEventAutoConfiguration.ITEM_READ_EVENTS_LISTENER);
registerAlias(ItemWriteListener.class, BatchEventAutoConfiguration.ITEM_WRITE_EVENTS_LISTENER);
registerAlias(SkipListener.class, BatchEventAutoConfiguration.SKIP_EVENTS_LISTENER);
}
开发者ID:spring-cloud,项目名称:spring-cloud-task,代码行数:14,代码来源:TaskBatchEventListenerBeanPostProcessorTests.java
示例2: itemProcessEventsListener
import org.springframework.batch.core.ItemProcessListener; //导入依赖的package包/类
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.item-process", name = "enabled", havingValue = "true", matchIfMissing = true)
public ItemProcessListener itemProcessEventsListener() {
return new EventEmittingItemProcessListener(listenerChannels.itemProcessEvents(),taskEventProperties.getItemProcessOrder());
}
示例3: registerItemProcessEvents
import org.springframework.batch.core.ItemProcessListener; //导入依赖的package包/类
private void registerItemProcessEvents(SimpleChunkProcessor chunkProcessor) {
if(this.applicationContext.containsBean(BatchEventAutoConfiguration.ITEM_PROCESS_EVENTS_LISTENER)) {
chunkProcessor.registerListener((ItemProcessListener) this.applicationContext.getBean(BatchEventAutoConfiguration.ITEM_PROCESS_EVENTS_LISTENER));
}
}