KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > core > task > TaskRejectedException


1 /*
2  * Copyright 2002-2007 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.core.task;
18
19 import org.springframework.core.NestedRuntimeException;
20
21 /**
22  * Exception thrown when a {@link TaskExecutor} rejects to accept
23  * a given task for execution.
24  *
25  * @author Juergen Hoeller
26  * @since 2.0.1
27  * @see TaskExecutor#execute(Runnable)
28  * @see TaskTimeoutException
29  */

30 public class TaskRejectedException extends NestedRuntimeException {
31
32     /**
33      * Create a new <code>TaskRejectedException</code>
34      * with the specified detail message and no root cause.
35      * @param msg the detail message
36      */

37     public TaskRejectedException(String JavaDoc msg) {
38         super(msg);
39     }
40
41     /**
42      * Create a new <code>TaskRejectedException</code>
43      * with the specified detail message and the given root cause.
44      * @param msg the detail message
45      * @param cause the root cause (usually from using an underlying
46      * API such as the <code>java.util.concurrent</code> package)
47      * @see java.util.concurrent.RejectedExecutionException
48      */

49     public TaskRejectedException(String JavaDoc msg, Throwable JavaDoc cause) {
50         super(msg, cause);
51     }
52
53 }
54
Popular Tags