KickJava   Java API By Example, From Geeks To Geeks.

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


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;
25
26 /**
27  * A <code>SecurityException</code> indicates error conditions
28  * related to the security
29  * contract between an application server and resource adapter. The common
30  * error conditions represented by this exception are:
31  * <UL>
32  * <LI>Invalid security information (represented as a Subject instance) passed
33  * across the security contract - for example, credentials have expired or
34  * have invalid format.
35  * <LI>Lack of support for a specific security mechanism in an EIS or resource
36  * adapter.
37  * <LI>Failure to create a connection to an EIS because of failed
38  * authentication or authorization.
39  * <LI>Failure to authenticate a resource principal to an EIS instance
40  * or failure
41  * to establish a secure association with an underlying EIS instance.
42  * <LI>Access control exception to indicate that a requested access to an EIS
43  * resource or a request to create a new connection is denied.
44  * </UL>
45  *
46  * @version 1.0
47  * @author Rahul Sharma
48  * @author Ram Jeyaraman
49  */

50
51 public class SecurityException extends javax.resource.ResourceException JavaDoc {
52
53     /**
54      * Constructs a new instance with null as its detail message.
55      */

56     public SecurityException() { super(); }
57
58     /**
59      * Constructs a new instance with the specified detail message.
60      *
61      * @param message the detail message.
62      */

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

72     public SecurityException(Throwable JavaDoc cause) {
73     super(cause);
74     }
75
76     /**
77      * Constructs a new throwable with the specified detail message and cause.
78      *
79      * @param message the detail message.
80      *
81      * @param cause a chained exception of type <code>Throwable</code>.
82      */

83     public SecurityException(String JavaDoc message, Throwable JavaDoc cause) {
84     super(message, cause);
85     }
86
87     /**
88      * Constructs a new throwable with the specified detail message and
89      * an error code.
90      *
91      * @param message a description of the exception.
92      * @param errorCode a string specifying the vendor specific error code.
93      */

94     public SecurityException(String JavaDoc message, String JavaDoc errorCode) {
95     super(message, errorCode);
96     }
97 }
98
Popular Tags