congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RepeatTemplate.unwrapIfRethrown
Code IndexAdd Tabnine to your IDE (free)

How to use
unwrapIfRethrown
method
in
org.springframework.batch.repeat.support.RepeatTemplate

Best Java code snippets using org.springframework.batch.repeat.support.RepeatTemplate.unwrapIfRethrown (Showing top 2 results out of 315)

origin: spring-projects/spring-batch

private void doHandle(Throwable throwable, RepeatContext context, Collection<Throwable> deferred) {
  // An exception alone is not sufficient grounds for not
  // continuing
  Throwable unwrappedThrowable = unwrapIfRethrown(throwable);
  try {
    for (int i = listeners.length; i-- > 0;) {
      RepeatListener interceptor = listeners[i];
      // This is not an error - only log at debug
      // level.
      if (logger.isDebugEnabled()) {
        logger.debug("Exception intercepted (" + (i + 1) + " of " + listeners.length + ")", unwrappedThrowable);
      }
      interceptor.onError(context, unwrappedThrowable);
    }
    if (logger.isDebugEnabled()) {
      logger.debug("Handling exception: " + throwable.getClass().getName() + ", caused by: "
          + unwrappedThrowable.getClass().getName() + ": " + unwrappedThrowable.getMessage());
    }
    exceptionHandler.handleException(context, unwrappedThrowable);
  }
  catch (Throwable handled) {
    deferred.add(handled);
  }
}
origin: apache/servicemix-bundles

private void doHandle(Throwable throwable, RepeatContext context, Collection<Throwable> deferred) {
  // An exception alone is not sufficient grounds for not
  // continuing
  Throwable unwrappedThrowable = unwrapIfRethrown(throwable);
  try {
    for (int i = listeners.length; i-- > 0;) {
      RepeatListener interceptor = listeners[i];
      // This is not an error - only log at debug
      // level.
      if (logger.isDebugEnabled()) {
        logger.debug("Exception intercepted (" + (i + 1) + " of " + listeners.length + ")", unwrappedThrowable);
      }
      interceptor.onError(context, unwrappedThrowable);
    }
    if (logger.isDebugEnabled()) {
      logger.debug("Handling exception: " + throwable.getClass().getName() + ", caused by: "
          + unwrappedThrowable.getClass().getName() + ": " + unwrappedThrowable.getMessage());
    }
    exceptionHandler.handleException(context, unwrappedThrowable);
  }
  catch (Throwable handled) {
    deferred.add(handled);
  }
}
org.springframework.batch.repeat.supportRepeatTemplateunwrapIfRethrown

Javadoc

Unwraps the throwable if it has been wrapped by #rethrow(Throwable).

Popular methods of RepeatTemplate

  • <init>
  • setCompletionPolicy
  • setExceptionHandler
  • iterate
  • createInternalState
    Create an internal state object that is used to store data needed internally in the scope of an iter
  • doHandle
  • executeAfterInterceptors
    Convenience method to execute after interceptors on a callback result.
  • executeInternal
    Internal convenience method to loop over interceptors and batch callbacks.
  • getNextResult
    Get the next completed result, possibly executing several callbacks until one finally finishes. Norm
  • isComplete
    Delegate to the CompletionPolicy.
  • isMarkedComplete
  • rethrow
    Re-throws the original throwable if it is unchecked, wraps checked exceptions into RepeatException.
  • isMarkedComplete,
  • rethrow,
  • start,
  • update,
  • waitForResults,
  • registerListener,
  • setListeners

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JLabel (javax.swing)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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