KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > resource > spi > IllegalStateException


1 /*
2  * Copyright 2004-2005 Sun Microsystems, Inc. All rights reserved.
3  * Use is subject to license terms.
4  */

5
6 package javax.resource.spi;
7
8 /**
9  * An <code>IllegalStateException</code>
10  * is thrown from a method if the callee (resource
11  * adapter or application server for system contracts) is in an illegal or
12  * inappropriate state for the method invocation.
13  *
14  * @version 1.0
15  * @author Rahul Sharma
16  * @author Ram Jeyaraman
17  */

18
19 public class IllegalStateException extends javax.resource.ResourceException JavaDoc {
20
21     /**
22      * Constructs a new instance with null as its detail message.
23      */

24     public IllegalStateException() { super(); }
25
26     /**
27      * Constructs a new instance with the specified detail message.
28      *
29      * @param message the detail message.
30      */

31     public IllegalStateException(String JavaDoc message) {
32     super(message);
33     }
34
35     /**
36      * Constructs a new throwable with the specified cause.
37      *
38      * @param cause a chained exception of type <code>Throwable</code>.
39      */

40     public IllegalStateException(Throwable JavaDoc cause) {
41     super(cause);
42     }
43
44     /**
45      * Constructs a new throwable with the specified detail message and cause.
46      *
47      * @param message the detail message.
48      *
49      * @param cause a chained exception of type <code>Throwable</code>.
50      */

51     public IllegalStateException(String JavaDoc message, Throwable JavaDoc cause) {
52     super(message, cause);
53     }
54
55     /**
56      * Constructs a new throwable with the specified detail message and
57      * an error code.
58      *
59      * @param message a description of the exception.
60      * @param errorCode a string specifying the vendor specific error code.
61      */

62     public IllegalStateException(String JavaDoc message, String JavaDoc errorCode) {
63     super(message, errorCode);
64     }
65 }
66
Popular Tags