Top Description Constructors Methods
org.springframework.core.task

public Class TaskRejectedException

extends RejectedExecutionException
Class Inheritance
Known Direct Subclasses
org.springframework.core.task.TaskTimeoutException
Annotations
@SuppressWarnings:serial
Imports
java.util.concurrent.Executor, .ExecutorService, .RejectedExecutionException

Exception thrown when a TaskExecutor rejects to accept a given task for execution.
Author
Juergen Hoeller
Since
2.0.1
See Also
TaskExecutor#execute(Runnable)

Constructor Summary

AccessConstructor and Description
public
TaskRejectedException(String
the detail message
msg
)

Create a new TaskRejectedException with the specified detail message and no root cause.

public
TaskRejectedException(String
the detail message
msg
,
Throwable
the root cause (usually from using an underlying API such as the java.util.concurrent package)
cause
)

Create a new TaskRejectedException with the specified detail message and the given root cause.

public
TaskRejectedException(Executor
the Executor that rejected the task
executor
,
Object
the task object that got rejected
task
,
RejectedExecutionException cause)

Create a new TaskRejectedException with a default message for the given executor and task.

Method Summary

Modifier and TypeMethod and Description
private static String

Constructor Detail

TaskRejectedExceptionback to summary
public TaskRejectedException(String msg)

Create a new TaskRejectedException with the specified detail message and no root cause.

Parameters
msg:String

the detail message

TaskRejectedExceptionback to summary
public TaskRejectedException(String msg, Throwable cause)

Create a new TaskRejectedException with the specified detail message and the given root cause.

Parameters
msg:String

the detail message

cause:Throwable

the root cause (usually from using an underlying API such as the java.util.concurrent package)

See Also
java.util.concurrent.RejectedExecutionException
TaskRejectedExceptionback to summary
public TaskRejectedException(Executor executor, Object task, RejectedExecutionException cause)

Create a new TaskRejectedException with a default message for the given executor and task.

Parameters
executor:Executor

the Executor that rejected the task

task:Object

the task object that got rejected

cause:RejectedExecutionException

the original RejectedExecutionException

Since
6.1
See Also
ExecutorService#isShutdown(), java.util.concurrent.RejectedExecutionException

Method Detail

executorDescriptionback to summary
private static String executorDescription(Executor executor)