Examples of StepListenerFactoryBean


Examples of org.springframework.batch.core.listener.StepListenerFactoryBean

    itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnReadError.class));
    itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnProcessError.class));
    itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnWriteError.class));

    if(itemListenerMethods.size() > 0) {
      StepListenerFactoryBean factory = new StepListenerFactoryBean();
      factory.setDelegate(listener);
      itemListeners.add((StepListener) factory.getObject());
    }

    @SuppressWarnings("unchecked")
    SimpleStepBuilder result = this;
    return result;
View Full Code Here

Examples of org.springframework.batch.core.listener.StepListenerFactoryBean

    chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeChunk.class));
    chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunk.class));
    chunkListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterChunkError.class));

    if(skipListenerMethods.size() > 0) {
      StepListenerFactoryBean factory = new StepListenerFactoryBean();
      factory.setDelegate(listener);
      skipListeners.add((SkipListener) factory.getObject());
    }

    if(chunkListenerMethods.size() > 0) {
      StepListenerFactoryBean factory = new StepListenerFactoryBean();
      factory.setDelegate(listener);
      super.listener(new TerminateOnExceptionChunkListenerDelegate((ChunkListener) factory.getObject()));
    }

    @SuppressWarnings("unchecked")
    SimpleStepBuilder result = this;
    return result;
View Full Code Here

Examples of org.springframework.batch.core.listener.StepListenerFactoryBean

    Set<Method> stepExecutionListenerMethods = new HashSet<Method>();
    stepExecutionListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeStep.class));
    stepExecutionListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterStep.class));

    if(stepExecutionListenerMethods.size() > 0) {
      StepListenerFactoryBean factory = new StepListenerFactoryBean();
      factory.setDelegate(listener);
      properties.addStepExecutionListener((StepExecutionListener) factory.getObject());
    }

    @SuppressWarnings("unchecked")
    B result = (B) this;
    return result;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.