Tabnine Logo
SkipWrapper.getException
Code IndexAdd Tabnine to your IDE (free)

How to use
getException
method
in
org.springframework.batch.core.step.item.SkipWrapper

Best Java code snippets using org.springframework.batch.core.step.item.SkipWrapper.getException (Showing top 7 results out of 315)

origin: spring-projects/spring-batch

private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) {
  for (SkipWrapper<I> wrapper : inputs.getSkips()) {
    I item = wrapper.getItem();
    if (item == null) {
      continue;
    }
    Throwable e = wrapper.getException();
    callProcessSkipListener(item, e);
  }
  for (SkipWrapper<O> wrapper : outputs.getSkips()) {
    Throwable e = wrapper.getException();
    try {
      getListener().onSkipInWrite(wrapper.getItem(), e);
    }
    catch (RuntimeException ex) {
      throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e);
    }
  }
  // Clear skips if we are possibly going to process this chunk again
  outputs.clearSkips();
  inputs.clearSkips();
}
origin: spring-projects/spring-batch

/**
 * Test method for {@link SkipWrapper#SkipWrapper(java.lang.Object)}.
 */
@Test
public void testItemWrapperT() {
  SkipWrapper<String> wrapper = new SkipWrapper<>("foo");
  assertEquals("foo", wrapper.getItem());
  assertEquals(null, wrapper.getException());
}
origin: spring-projects/spring-batch

/**
 * Test method for {@link org.springframework.batch.core.step.item.SkipWrapper#SkipWrapper(java.lang.Object, java.lang.Throwable)}.
 */
@Test
public void testItemWrapperTException() {
  SkipWrapper<String> wrapper = new SkipWrapper<>("foo", exception);
  assertEquals("foo", wrapper.getItem());
  assertEquals(exception, wrapper.getException());
}
origin: org.springframework.batch/org.springframework.batch.core

private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) {
  for (SkipWrapper<I> wrapper : inputs.getSkips()) {
    I item = wrapper.getItem();
    if (item == null) {
      continue;
    }
    Throwable e = wrapper.getException();
    callProcessSkipListener(item, e);
  }
  for (SkipWrapper<O> wrapper : outputs.getSkips()) {
    Throwable e = wrapper.getException();
    try {
      getListener().onSkipInWrite(wrapper.getItem(), e);
    }
    catch (RuntimeException ex) {
      throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e);
    }
  }
  // Clear skips if we are possibly going to process this chunk again
  outputs.clearSkips();
  inputs.clearSkips();
}
origin: org.springframework.batch/spring-batch-core

private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) {
  for (SkipWrapper<I> wrapper : inputs.getSkips()) {
    I item = wrapper.getItem();
    if (item == null) {
      continue;
    }
    Throwable e = wrapper.getException();
    callProcessSkipListener(item, e);
  }
  for (SkipWrapper<O> wrapper : outputs.getSkips()) {
    Throwable e = wrapper.getException();
    try {
      getListener().onSkipInWrite(wrapper.getItem(), e);
    }
    catch (RuntimeException ex) {
      throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e);
    }
  }
  // Clear skips if we are possibly going to process this chunk again
  outputs.clearSkips();
  inputs.clearSkips();
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) {
  for (SkipWrapper<I> wrapper : inputs.getSkips()) {
    I item = wrapper.getItem();
    if (item == null) {
      continue;
    }
    Throwable e = wrapper.getException();
    callProcessSkipListener(item, e);
  }
  for (SkipWrapper<O> wrapper : outputs.getSkips()) {
    Throwable e = wrapper.getException();
    try {
      getListener().onSkipInWrite(wrapper.getItem(), e);
    }
    catch (RuntimeException ex) {
      throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e);
    }
  }
  // Clear skips if we are possibly going to process this chunk again
  outputs.clearSkips();
  inputs.clearSkips();
}
origin: apache/servicemix-bundles

private void callSkipListeners(final Chunk<I> inputs, final Chunk<O> outputs) {
  for (SkipWrapper<I> wrapper : inputs.getSkips()) {
    I item = wrapper.getItem();
    if (item == null) {
      continue;
    }
    Throwable e = wrapper.getException();
    callProcessSkipListener(item, e);
  }
  for (SkipWrapper<O> wrapper : outputs.getSkips()) {
    Throwable e = wrapper.getException();
    try {
      getListener().onSkipInWrite(wrapper.getItem(), e);
    }
    catch (RuntimeException ex) {
      throw new SkipListenerFailedException("Fatal exception in SkipListener.", ex, e);
    }
  }
  // Clear skips if we are possibly going to process this chunk again
  outputs.clearSkips();
  inputs.clearSkips();
}
org.springframework.batch.core.step.itemSkipWrappergetException

Javadoc

Public getter for the exception.

Popular methods of SkipWrapper

  • getItem
    Public getter for the item.
  • <init>
  • toString

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • JFileChooser (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
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