01: /*
02: * Written by Doug Lea with assistance from members of JCP JSR-166
03: * Expert Group and released to the public domain, as explained at
04: * http://creativecommons.org/licenses/publicdomain
05: */
06:
07: package java.util.concurrent;
08:
09: /**
10: * Exception thrown by an {@link Executor} when a task cannot be
11: * accepted for execution.
12: *
13: * @since 1.5
14: * @author Doug Lea
15: */
16: public class RejectedExecutionException extends RuntimeException {
17: private static final long serialVersionUID = -375805702767069545L;
18:
19: /**
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}.
23: */
24: public RejectedExecutionException() {
25: }
26:
27: /**
28: * Constructs a <tt>RejectedExecutionException</tt> with the
29: * specified detail message. The cause is not initialized, and may
30: * subsequently be initialized by a call to {@link
31: * #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
41: * specified detail 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
53: * specified cause. The detail message is set to: <pre> (cause ==
54: * null ? null : cause.toString())</pre> (which typically contains
55: * the class and detail message of <tt>cause</tt>).
56: *
57: * @param cause the cause (which is saved for later retrieval by the
58: * {@link #getCause()} method)
59: */
60: public RejectedExecutionException(Throwable cause) {
61: super(cause);
62: }
63: }
|