KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > security > auth > callback > UnsupportedCallbackException


1 /*
2  * @(#)UnsupportedCallbackException.java 1.11 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
8 package javax.security.auth.callback;
9
10 /**
11  * Signals that a <code>CallbackHandler</code> does not
12  * recognize a particular <code>Callback</code>.
13  *
14  * @version 1.11, 12/19/03
15  */

16 public class UnsupportedCallbackException extends Exception JavaDoc {
17
18     private static final long serialVersionUID = -6873556327655666839L;
19
20     /**
21      * @serial
22      */

23     private Callback JavaDoc callback;
24
25     /**
26      * Constructs a <code>UnsupportedCallbackException</code>
27      * with no detail message.
28      *
29      * <p>
30      *
31      * @param callback the unrecognized <code>Callback</code>.
32      */

33     public UnsupportedCallbackException(Callback JavaDoc callback) {
34     super();
35     this.callback = callback;
36     }
37
38     /**
39      * Constructs a UnsupportedCallbackException with the specified detail
40      * message. A detail message is a String that describes this particular
41      * exception.
42      *
43      * <p>
44      *
45      * @param callback the unrecognized <code>Callback</code>. <p>
46      *
47      * @param msg the detail message.
48      */

49     public UnsupportedCallbackException(Callback JavaDoc callback, String JavaDoc msg) {
50     super(msg);
51     this.callback = callback;
52     }
53
54     /**
55      * Get the unrecognized <code>Callback</code>.
56      *
57      * <p>
58      *
59      * @return the unrecognized <code>Callback</code>.
60      */

61     public Callback JavaDoc getCallback() {
62     return callback;
63     }
64 }
65
Popular Tags