本文整理汇总了Java中org.springframework.batch.core.StepExecutionListener类的典型用法代码示例。如果您正苦于以下问题:Java StepExecutionListener类的具体用法?Java StepExecutionListener怎么用?Java StepExecutionListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StepExecutionListener类属于org.springframework.batch.core包,在下文中一共展示了StepExecutionListener类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createTaskletStepWithListener
import org.springframework.batch.core.StepExecutionListener; //导入依赖的package包/类
private Step createTaskletStepWithListener(final String taskName,
StepExecutionListener stepExecutionListener) {
return this.steps.get(taskName)
.tasklet(new Tasklet() {
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
return RepeatStatus.FINISHED;
}
})
.transactionAttribute(getTransactionAttribute())
.listener(stepExecutionListener)
.build();
}
开发者ID:spring-cloud-task-app-starters,项目名称:composed-task-runner,代码行数:14,代码来源:ComposedRunnerVisitorConfiguration.java
示例2: registerStepExecutionEventListener
import org.springframework.batch.core.StepExecutionListener; //导入依赖的package包/类
private void registerStepExecutionEventListener(Object bean) {
if (this.applicationContext.containsBean(BatchEventAutoConfiguration.STEP_EXECUTION_EVENTS_LISTENER)) {
StepExecutionListener stepExecutionListener =
(StepExecutionListener) this.applicationContext.getBean(BatchEventAutoConfiguration.STEP_EXECUTION_EVENTS_LISTENER);
AbstractStep step = (AbstractStep) bean;
step.registerStepExecutionListener(stepExecutionListener);
}
}
示例3: setupMock
import org.springframework.batch.core.StepExecutionListener; //导入依赖的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
示例4: composedTaskStepExecutionListener
import org.springframework.batch.core.StepExecutionListener; //导入依赖的package包/类
@Bean
public StepExecutionListener composedTaskStepExecutionListener(
TaskConfigurer taskConfigurer) {
return new ComposedTaskStepExecutionListener(taskConfigurer.getTaskExplorer());
}
开发者ID:spring-cloud-task-app-starters,项目名称:composed-task-runner,代码行数:6,代码来源:ComposedTaskRunnerConfiguration.java
示例5: stepExecutionEventsListener
import org.springframework.batch.core.StepExecutionListener; //导入依赖的package包/类
@Bean
@ConditionalOnProperty(prefix = "spring.cloud.task.batch.events.step-execution", name = "enabled", havingValue = "true", matchIfMissing = true)
public StepExecutionListener stepExecutionEventsListener() {
return new EventEmittingStepExecutionListener(listenerChannels.stepExecutionEvents(),taskEventProperties.getStepExecutionOrder());
}
示例6: stepExecutionListeners
import org.springframework.batch.core.StepExecutionListener; //导入依赖的package包/类
@Override
public Set<StepExecutionListener> stepExecutionListeners() {
Set<StepExecutionListener> listeners = new HashSet<StepExecutionListener>();
listeners.add(metricsListener());
return listeners;
}
示例7: stepExecutionListeners
import org.springframework.batch.core.StepExecutionListener; //导入依赖的package包/类
@Override
public Set<StepExecutionListener> stepExecutionListeners() {
return new HashSet<StepExecutionListener>();
}
示例8: stepExecutionListeners
import org.springframework.batch.core.StepExecutionListener; //导入依赖的package包/类
/**
* Returns a set of StepExecutionListeners that will be added to each Job.
* May not return null.
* @return Returns a set of StepExecutionListeners that will be added to each Job. May not return null.
*/
public Set<StepExecutionListener> stepExecutionListeners();