1. /*
  2. * @(#)RejectedExecutionException.java 1.3 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.util.concurrent;
  8. /**
  9. * Exception thrown by an {@link Executor} when a task cannot be
  10. * accepted for execution.
  11. *
  12. * @since 1.5
  13. * @author Doug Lea
  14. */
  15. public class RejectedExecutionException extends RuntimeException {
  16. private static final long serialVersionUID = -375805702767069545L;
  17. /**
  18. * Constructs a <tt>RejectedExecutionException</tt> with no detail message.
  19. * The cause is not initialized, and may subsequently be
  20. * initialized by a call to {@link #initCause(Throwable) initCause}.
  21. */
  22. public RejectedExecutionException() { }
  23. /**
  24. * Constructs a <tt>RejectedExecutionException</tt> with the
  25. * specified detail message. The cause is not initialized, and may
  26. * subsequently be initialized by a call to {@link
  27. * #initCause(Throwable) initCause}.
  28. *
  29. * @param message the detail message
  30. */
  31. public RejectedExecutionException(String message) {
  32. super(message);
  33. }
  34. /**
  35. * Constructs a <tt>RejectedExecutionException</tt> with the
  36. * specified detail message and cause.
  37. *
  38. * @param message the detail message
  39. * @param cause the cause (which is saved for later retrieval by the
  40. * {@link #getCause()} method)
  41. */
  42. public RejectedExecutionException(String message, Throwable cause) {
  43. super(message, cause);
  44. }
  45. /**
  46. * Constructs a <tt>RejectedExecutionException</tt> with the
  47. * specified cause. The detail message is set to: <pre> (cause ==
  48. * null ? null : cause.toString())</pre> (which typically contains
  49. * the class and detail message of <tt>cause</tt>).
  50. *
  51. * @param cause the cause (which is saved for later retrieval by the
  52. * {@link #getCause()} method)
  53. */
  54. public RejectedExecutionException(Throwable cause) {
  55. super(cause);
  56. }
  57. }