Tabnine Logo
MulticasterBatchListener.beforeProcess
Code IndexAdd Tabnine to your IDE (free)

How to use
beforeProcess
method
in
org.springframework.batch.core.listener.MulticasterBatchListener

Best Java code snippets using org.springframework.batch.core.listener.MulticasterBatchListener.beforeProcess (Showing top 10 results out of 315)

origin: spring-projects/spring-batch

/**
 * Implements processing and all related listener calls.
 *
 * @param item the item to be processed
 * @return the processed item
 * @throws Exception thrown if error occurs during processing.
 */
protected final O doTransform(I item) throws Exception {
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: spring-projects/spring-batch

/**
 * @param item the input item
 * @return the result of the processing
 * @throws Exception thrown if error occurs.
 */
protected final O doProcess(I item) throws Exception {
  if (itemProcessor == null) {
    @SuppressWarnings("unchecked")
    O result = (O) item;
    return result;
  }
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: spring-projects/spring-batch

@Test
public void testBeforeProcessFails_withAnnotatedListener() {
  StepListener listener = StepListenerFactoryBean.getListener(new AnnotationBasedStepListener());
  multicast.register(listener);
  try {
    multicast.beforeProcess(null);
    fail("Expected StepListenerFailedException");
  } catch (StepListenerFailedException e) {
    // expected
    Throwable cause = e.getCause();
    String message = cause.getMessage();
    assertTrue(cause instanceof IllegalStateException);
    assertEquals("Wrong message: " + message, "listener error", message);
  }
}
origin: org.springframework.batch/spring-batch-core

/**
 * Implements processing and all related listener calls.
 *
 * @param item the item to be processed
 * @return the processed item
 * @throws Exception thrown if error occurs during processing.
 */
protected final O doTransform(I item) throws Exception {
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: apache/servicemix-bundles

/**
 * @param item the input item
 * @return the result of the processing
 * @throws Exception thrown if error occurs.
 */
protected final O doProcess(I item) throws Exception {
  if (itemProcessor == null) {
    @SuppressWarnings("unchecked")
    O result = (O) item;
    return result;
  }
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: apache/servicemix-bundles

/**
 * Implements processing and all related listener calls.
 *
 * @param item the item to be processed
 * @return the processed item
 * @throws Exception thrown if error occurs during processing.
 */
protected final O doTransform(I item) throws Exception {
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * Implements processing and all related listener calls.
 *
 * @param item the item to be processed
 * @return the processed item
 * @throws Exception
 */
protected final O doTransform(I item) throws Exception {
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: org.springframework.batch/spring-batch-core

/**
 * @param item the input item
 * @return the result of the processing
 * @throws Exception thrown if error occurs.
 */
protected final O doProcess(I item) throws Exception {
  if (itemProcessor == null) {
    @SuppressWarnings("unchecked")
    O result = (O) item;
    return result;
  }
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: org.springframework.batch/org.springframework.batch.core

/**
 * @param item the input item
 * @return the result of the processing
 * @throws Exception
 */
protected final O doProcess(I item) throws Exception {
  if (itemProcessor==null) {
    @SuppressWarnings("unchecked")
    O result = (O) item;
    return result;
  }
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

/**
 * @param item the input item
 * @return the result of the processing
 * @throws Exception
 */
protected final O doProcess(I item) throws Exception {
  if (itemProcessor == null) {
    @SuppressWarnings("unchecked")
    O result = (O) item;
    return result;
  }
  try {
    listener.beforeProcess(item);
    O result = itemProcessor.process(item);
    listener.afterProcess(item, result);
    return result;
  }
  catch (Exception e) {
    listener.onProcessError(item, e);
    throw e;
  }
}
org.springframework.batch.core.listenerMulticasterBatchListenerbeforeProcess

Popular methods of MulticasterBatchListener

  • afterProcess
  • afterRead
  • afterWrite
  • beforeRead
  • beforeWrite
  • onReadError
  • onSkipInProcess
  • onSkipInRead
  • onSkipInWrite
  • onWriteError
  • register
    Register the listener for callbacks on the appropriate interfaces implemented. Any StepListener can
  • onProcessError
  • register,
  • onProcessError,
  • onRetryProcessException,
  • onRetryReadException,
  • onRetryWriteException,
  • getTargetException,
  • afterChunk,
  • afterStep,
  • beforeChunk

Popular in Java

  • Making http post requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • startActivity (Activity)
  • requestLocationUpdates (LocationManager)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • JCheckBox (javax.swing)
  • Top Vim 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