1 |
dl |
1.1 |
/* |
2 |
|
|
* Written by Doug Lea with assistance from members of JCP JSR-166 |
3 |
|
|
* Expert Group and released to the public domain. Use, modify, and |
4 |
|
|
* redistribute this code in any way without acknowledgement. |
5 |
|
|
*/ |
6 |
|
|
|
7 |
|
|
package java.util.concurrent; |
8 |
|
|
|
9 |
|
|
/** |
10 |
|
|
* Thrown by an <tt>Executor</tt> when a task cannot be accepted for execution. |
11 |
|
|
* |
12 |
|
|
* @since 1.5 |
13 |
|
|
* @see Executor#execute |
14 |
|
|
* |
15 |
|
|
* @spec JSR-166 |
16 |
dl |
1.3 |
* @revised $Date: 2003/06/24 14:34:48 $ |
17 |
dl |
1.2 |
* @editor $Author: dl $ |
18 |
|
|
|
19 |
dl |
1.1 |
*/ |
20 |
|
|
public class RejectedExecutionException extends RuntimeException { |
21 |
dl |
1.3 |
private static final long serialVersionUID = -375805702767069545L; |
22 |
dl |
1.1 |
|
23 |
|
|
/** |
24 |
|
|
* Constructs a <tt>RejectedExecutionException</tt> with no detail message. |
25 |
|
|
* The cause is not initialized, and may subsequently be |
26 |
|
|
* initialized by a call to {@link #initCause(Throwable) initCause}. |
27 |
|
|
*/ |
28 |
|
|
public RejectedExecutionException() { } |
29 |
|
|
|
30 |
|
|
/** |
31 |
dl |
1.2 |
* Constructs a <tt>RejectedExecutionException</tt> with the |
32 |
|
|
* specified detail message. The cause is not initialized, and may |
33 |
|
|
* subsequently be initialized by a call to {@link |
34 |
|
|
* #initCause(Throwable) initCause}. |
35 |
dl |
1.1 |
* |
36 |
|
|
* @param message the detail message |
37 |
|
|
*/ |
38 |
|
|
public RejectedExecutionException(String message) { |
39 |
|
|
super(message); |
40 |
|
|
} |
41 |
|
|
|
42 |
|
|
/** |
43 |
dl |
1.2 |
* Constructs a <tt>RejectedExecutionException</tt> with the |
44 |
|
|
* specified detail message and cause. |
45 |
dl |
1.1 |
* |
46 |
|
|
* @param message the detail message |
47 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
48 |
|
|
* {@link #getCause()} method) |
49 |
|
|
*/ |
50 |
|
|
public RejectedExecutionException(String message, Throwable cause) { |
51 |
|
|
super(message, cause); |
52 |
|
|
} |
53 |
|
|
|
54 |
|
|
/** |
55 |
dl |
1.2 |
* Constructs a <tt>RejectedExecutionException</tt> with the |
56 |
|
|
* specified cause. The detail message is set to: <pre> (cause == |
57 |
|
|
* null ? null : cause.toString())</pre> (which typically contains |
58 |
|
|
* the class and detail message of <tt>cause</tt>). |
59 |
dl |
1.1 |
* |
60 |
|
|
* @param cause the cause (which is saved for later retrieval by the |
61 |
|
|
* {@link #getCause()} method) |
62 |
|
|
*/ |
63 |
|
|
public RejectedExecutionException(Throwable cause) { |
64 |
|
|
super(cause); |
65 |
|
|
} |
66 |
|
|
} |