Java 类org.springframework.batch.core.SkipListener 实例源码

项目:spring-cloud-task    文件:TaskBatchEventListenerBeanPostProcessorTests.java   
@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);
}
项目:spring-cloud-task    文件:BatchEventAutoConfiguration.java   
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.skip", name = "enabled", havingValue = "true", matchIfMissing = true)
public SkipListener skipEventsListener() {
    return new EventEmittingSkipListener(listenerChannels.skipEvents(),taskEventProperties.getItemProcessOrder());
}
项目:spring-cloud-task    文件:TaskBatchEventListenerBeanPostProcessor.java   
private void registerSkipEvents(SimpleChunkProvider chunkProvider) {
    if (this.applicationContext.containsBean(BatchEventAutoConfiguration.SKIP_EVENTS_LISTENER)) {
        chunkProvider.registerListener((SkipListener) this.applicationContext.getBean(BatchEventAutoConfiguration.SKIP_EVENTS_LISTENER));
    }
}
项目:spring-cloud-task    文件:TaskBatchEventListenerBeanPostProcessor.java   
private void registerSkipEvents(SimpleChunkProcessor chunkProcessor) {
    if(this.applicationContext.containsBean(BatchEventAutoConfiguration.SKIP_EVENTS_LISTENER)) {
        chunkProcessor.registerListener((SkipListener) this.applicationContext.getBean(BatchEventAutoConfiguration.SKIP_EVENTS_LISTENER));
    }
}
项目:spring-batch-experiments    文件:AbstractBatchConfiguration.java   
@Bean
public SkipListener skipListener() {
    return Mockito.mock(SkipListener.class);
}
项目:spring-batch-experiments    文件:AbstractRobustnessBatchConfiguration.java   
@Bean
public SkipListener skipListener() {
    return Mockito.mock(SkipListener.class);
}