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 |
* @revised $Date: 2003/02/26 10:48:09 $ |
17 |
* @editor $Author: jozart $ |
18 |
*/ |
19 |
public class RejectedExecutionException extends RuntimeException { |
20 |
|
21 |
/** |
22 |
* Constructs a <tt>RejectedExecutionException</tt> with no detail message. |
23 |
* The cause is not initialized, and may subsequently be |
24 |
* initialized by a call to {@link #initCause(Throwable) initCause}. |
25 |
*/ |
26 |
public RejectedExecutionException() { } |
27 |
|
28 |
/** |
29 |
* Constructs a <tt>RejectedExecutionException</tt> with the specified detail |
30 |
* message. The cause is not initialized, and may subsequently be |
31 |
* initialized by a call to {@link #initCause(Throwable) initCause}. |
32 |
* |
33 |
* @param message the detail message |
34 |
*/ |
35 |
public RejectedExecutionException(String message) { |
36 |
super(message); |
37 |
} |
38 |
|
39 |
/** |
40 |
* Constructs a <tt>RejectedExecutionException</tt> with the specified detail |
41 |
* message and cause. |
42 |
* |
43 |
* @param message the detail message |
44 |
* @param cause the cause (which is saved for later retrieval by the |
45 |
* {@link #getCause()} method) |
46 |
*/ |
47 |
public RejectedExecutionException(String message, Throwable cause) { |
48 |
super(message, cause); |
49 |
} |
50 |
|
51 |
/** |
52 |
* Constructs a <tt>RejectedExecutionException</tt> with the specified cause. |
53 |
* The detail message is set to: |
54 |
* <pre> |
55 |
* (cause == null ? null : cause.toString())</pre> |
56 |
* (which typically contains the class and detail message of |
57 |
* <tt>cause</tt>). |
58 |
* |
59 |
* @param cause the cause (which is saved for later retrieval by the |
60 |
* {@link #getCause()} method) |
61 |
*/ |
62 |
public RejectedExecutionException(Throwable cause) { |
63 |
super(cause); |
64 |
} |
65 |
} |