Tabnine Logo
StepListenerFactoryBean.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.springframework.batch.core.listener.StepListenerFactoryBean
constructor

Best Java code snippets using org.springframework.batch.core.listener.StepListenerFactoryBean.<init> (Showing top 20 results out of 315)

origin: spring-projects/spring-batch

/**
 * Convenience method to wrap any object and expose the appropriate
 * {@link StepListener} interfaces.
 *
 * @param delegate a delegate object
 * @return a StepListener instance constructed from the delegate
 */
public static StepListener getListener(Object delegate) {
  StepListenerFactoryBean factory = new StepListenerFactoryBean();
  factory.setDelegate(delegate);
  return (StepListener) factory.getObject();
}
origin: spring-projects/spring-batch

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
public B listener(Object listener) {
  Set<Method> stepExecutionListenerMethods = new HashSet<>();
  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;
}
origin: spring-projects/spring-batch

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@SuppressWarnings("unchecked")
@Override
public SimpleStepBuilder<I, O> listener(Object listener) {
  super.listener(listener);
  Set<Method> itemListenerMethods = new HashSet<>();
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeWrite.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterWrite.class));
  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<I, O> result = this;
  return result;
}
origin: spring-projects/spring-batch

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@Override
@SuppressWarnings("unchecked")
public SimpleStepBuilder<I, O> listener(Object listener) {
  super.listener(listener);
  Set<Method> skipListenerMethods = new HashSet<>();
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInRead.class));
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInProcess.class));
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInWrite.class));
  if(skipListenerMethods.size() > 0) {
    StepListenerFactoryBean factory = new StepListenerFactoryBean();
    factory.setDelegate(listener);
    skipListeners.add((SkipListener) factory.getObject());
  }
  @SuppressWarnings("unchecked")
  SimpleStepBuilder<I, O> result = this;
  return result;
}
origin: spring-projects/spring-batch

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@Override
public B listener(Object listener) {
  super.listener(listener);
  Set<Method> chunkListenerMethods = new HashSet<>();
  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(chunkListenerMethods.size() > 0) {
    StepListenerFactoryBean factory = new StepListenerFactoryBean();
    factory.setDelegate(listener);
    this.listener((ChunkListener) factory.getObject());
  }
  @SuppressWarnings("unchecked")
  B result = (B) this;
  return result;
}
origin: spring-projects/spring-batch

@Before
public void setUp() {
  factoryBean = new StepListenerFactoryBean();
}
origin: org.springframework.batch/spring-batch-core

/**
 * Convenience method to wrap any object and expose the appropriate
 * {@link StepListener} interfaces.
 *
 * @param delegate a delegate object
 * @return a StepListener instance constructed from the delegate
 */
public static StepListener getListener(Object delegate) {
  StepListenerFactoryBean factory = new StepListenerFactoryBean();
  factory.setDelegate(delegate);
  return (StepListener) factory.getObject();
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * Convenience method to wrap any object and expose the appropriate
 * {@link StepListener} interfaces.
 *
 * @param delegate a delegate object
 * @return a StepListener instance constructed from the delegate
 */
public static StepListener getListener(Object delegate) {
  StepListenerFactoryBean factory = new StepListenerFactoryBean();
  factory.setDelegate(delegate);
  return (StepListener) factory.getObject();
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * Convenience method to wrap any object and expose the appropriate
 * {@link StepListener} interfaces.
 * 
 * @param delegate a delegate object
 * @return a StepListener instance constructed from the delegate
 */
public static StepListener getListener(Object delegate) {
  StepListenerFactoryBean factory = new StepListenerFactoryBean();
  factory.setDelegate(delegate);
  return (StepListener) factory.getObject();
}
origin: apache/servicemix-bundles

/**
 * Convenience method to wrap any object and expose the appropriate
 * {@link StepListener} interfaces.
 *
 * @param delegate a delegate object
 * @return a StepListener instance constructed from the delegate
 */
public static StepListener getListener(Object delegate) {
  StepListenerFactoryBean factory = new StepListenerFactoryBean();
  factory.setDelegate(delegate);
  return (StepListener) factory.getObject();
}
origin: org.springframework.batch/spring-batch-core

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
public B listener(Object listener) {
  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;
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
public B listener(Object listener) {
  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;
}
origin: apache/servicemix-bundles

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
public B listener(Object listener) {
  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;
}
origin: org.springframework.batch/spring-batch-core

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@Override
@SuppressWarnings("unchecked")
public SimpleStepBuilder<I, O> listener(Object listener) {
  super.listener(listener);
  Set<Method> skipListenerMethods = new HashSet<Method>();
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInRead.class));
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInProcess.class));
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInWrite.class));
  if(skipListenerMethods.size() > 0) {
    StepListenerFactoryBean factory = new StepListenerFactoryBean();
    factory.setDelegate(listener);
    skipListeners.add((SkipListener) factory.getObject());
  }
  @SuppressWarnings("unchecked")
  SimpleStepBuilder<I, O> result = this;
  return result;
}
origin: apache/servicemix-bundles

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@Override
@SuppressWarnings("unchecked")
public SimpleStepBuilder<I, O> listener(Object listener) {
  super.listener(listener);
  Set<Method> skipListenerMethods = new HashSet<Method>();
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInRead.class));
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInProcess.class));
  skipListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), OnSkipInWrite.class));
  if(skipListenerMethods.size() > 0) {
    StepListenerFactoryBean factory = new StepListenerFactoryBean();
    factory.setDelegate(listener);
    skipListeners.add((SkipListener) factory.getObject());
  }
  @SuppressWarnings("unchecked")
  SimpleStepBuilder<I, O> result = this;
  return result;
}
origin: org.springframework.batch/spring-batch-core

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@Override
public B listener(Object listener) {
  super.listener(listener);
  Set<Method> chunkListenerMethods = new HashSet<>();
  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(chunkListenerMethods.size() > 0) {
    StepListenerFactoryBean factory = new StepListenerFactoryBean();
    factory.setDelegate(listener);
    this.listener((ChunkListener) factory.getObject());
  }
  @SuppressWarnings("unchecked")
  B result = (B) this;
  return result;
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@Override
public SimpleStepBuilder listener(Object listener) {
  super.listener(listener);
  Set<Method> itemListenerMethods = new HashSet<Method>();
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeWrite.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterWrite.class));
  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;
}
origin: org.springframework.batch/spring-batch-core

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@SuppressWarnings("unchecked")
@Override
public SimpleStepBuilder<I, O> listener(Object listener) {
  super.listener(listener);
  Set<Method> itemListenerMethods = new HashSet<>();
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeWrite.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterWrite.class));
  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<I, O> result = this;
  return result;
}
origin: apache/servicemix-bundles

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@Override
public B listener(Object listener) {
  super.listener(listener);
  Set<Method> chunkListenerMethods = new HashSet<>();
  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(chunkListenerMethods.size() > 0) {
    StepListenerFactoryBean factory = new StepListenerFactoryBean();
    factory.setDelegate(listener);
    this.listener((ChunkListener) factory.getObject());
  }
  @SuppressWarnings("unchecked")
  B result = (B) this;
  return result;
}
origin: apache/servicemix-bundles

/**
 * Registers objects using the annotation based listener configuration.
 *
 * @param listener the object that has a method configured with listener annotation
 * @return this for fluent chaining
 */
@SuppressWarnings("unchecked")
@Override
public SimpleStepBuilder<I, O> listener(Object listener) {
  super.listener(listener);
  Set<Method> itemListenerMethods = new HashSet<>();
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterRead.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterProcess.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeWrite.class));
  itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterWrite.class));
  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<I, O> result = this;
  return result;
}
org.springframework.batch.core.listenerStepListenerFactoryBean<init>

Popular methods of StepListenerFactoryBean

  • getListener
    Convenience method to wrap any object and expose the appropriate StepListener interfaces.
  • getObject
  • isListener
    Convenience method to check whether the given object is or can be made into a StepListener.
  • setDelegate
  • setMetaDataMap

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • getExternalFilesDir (Context)
  • getContentResolver (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Menu (java.awt)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now