Class InvocationRejectedException

All Implemented Interfaces:
Serializable

public class InvocationRejectedException extends RejectedExecutionException
Exception thrown when a target will not get invoked due to a resilience policy, such as the concurrency limit having been reached for a class/method annotated with @ConcurrencyLimit.

Extends RejectedExecutionException as a common base class with TaskRejectedException, allowing for custom catch blocks to cover both Spring scenarios and ExecutorService rejection exceptions.

Since:
7.0.3
Author:
Juergen Hoeller
See Also:
  • Constructor Details

    • InvocationRejectedException

      public InvocationRejectedException(String msg, Object target)
      Create a new InvocationRejectedException with the specified detail message and target instance.
      Parameters:
      msg - the detail message
      target - the target instance that was about to be invoked
  • Method Details

    • getTarget

      public Object getTarget()
      Return the target instance that was about to be invoked.