2 * Written by Doug Lea with assistance from members of JCP JSR-166
3 * Expert Group and released to the public domain, as explained at
4 * http://creativecommons.org/licenses/publicdomain
7 package java.util.concurrent;
10 * Exception thrown by an {@link Executor} when a task cannot be
11 * accepted for execution.
16 public class RejectedExecutionException extends RuntimeException {
17 private static final long serialVersionUID = -375805702767069545L;
20 * Constructs a <tt>RejectedExecutionException</tt> with no detail message.
21 * The cause is not initialized, and may subsequently be
22 * initialized by a call to {@link #initCause(Throwable) initCause}.
24 public RejectedExecutionException() { }
27 * Constructs a <tt>RejectedExecutionException</tt> with the
28 * specified detail message. The cause is not initialized, and may
29 * subsequently be initialized by a call to {@link
30 * #initCause(Throwable) initCause}.
32 * @param message the detail message
34 public RejectedExecutionException(String message) {
39 * Constructs a <tt>RejectedExecutionException</tt> with the
40 * specified detail message and cause.
42 * @param message the detail message
43 * @param cause the cause (which is saved for later retrieval by the
44 * {@link #getCause()} method)
46 public RejectedExecutionException(String message, Throwable cause) {
47 super(message, cause);
51 * Constructs a <tt>RejectedExecutionException</tt> with the
52 * specified cause. The detail message is set to: <pre> (cause ==
53 * null ? null : cause.toString())</pre> (which typically contains
54 * the class and detail message of <tt>cause</tt>).
56 * @param cause the cause (which is saved for later retrieval by the
57 * {@link #getCause()} method)
59 public RejectedExecutionException(Throwable cause) {