KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > spi > work > WorkRejectedException


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package javax.resource.spi.work;
25
26 /**
27  * This exception is thrown by a <code>WorkManager</code> to indicate
28  * that a submitted <code>Work</code> instance has been rejected. The
29  * rejection could be due to internal factors or start timeout expiration.
30  *
31  * <p>This could be thrown only before the execution of a
32  * <code>Work</code> instance starts (that is, before a
33  * thread has been allocated for <code>Work</code> execution).
34
35  * <p>An associated error code indicates the nature of the error condition.
36  * Possible error codes are <code>WorkException.START_TIMED_OUT</code>,
37  * <code>WorkException.INTERNAL</code> or <code>WorkException.UNDEFINED</code>.
38  *
39  * @version 1.0
40  * @author Ram Jeyaraman
41  */

42 public class WorkRejectedException extends WorkException JavaDoc {
43
44     /**
45      * Constructs a new instance with null as its detail message.
46      */

47     public WorkRejectedException() { super(); }
48
49     /**
50      * Constructs a new instance with the specified detail message.
51      *
52      * @param message the detail message.
53      */

54     public WorkRejectedException(String JavaDoc message) {
55     super(message);
56     }
57
58     /**
59      * Constructs a new throwable with the specified cause.
60      *
61      * @param cause a chained exception of type <code>Throwable</code>.
62      */

63     public WorkRejectedException(Throwable JavaDoc cause) {
64     super(cause);
65     }
66
67     /**
68      * Constructs a new throwable with the specified detail message and cause.
69      *
70      * @param message the detail message.
71      *
72      * @param cause a chained exception of type <code>Throwable</code>.
73      */

74     public WorkRejectedException(String JavaDoc message, Throwable JavaDoc cause) {
75     super(message, cause);
76     }
77
78     /**
79      * Constructs a new throwable with the specified detail message and
80      * an error code.
81      *
82      * @param message a description of the exception.
83      * @param errorCode a string specifying the vendor specific error code.
84      */

85     public WorkRejectedException(String JavaDoc message, String JavaDoc errorCode) {
86     super(message, errorCode);
87     }
88 }
89
Popular Tags