KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > security > sasl > RealmChoiceCallback


1 /*
2  * @(#)RealmChoiceCallback.java 1.12 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.sasl;
9
10 import javax.security.auth.callback.ChoiceCallback JavaDoc;
11
12 /**
13   * This callback is used by <tt>SaslClient</tt> and <tt>SaslServer</tt>
14   * to obtain a realm given a list of realm choices.
15   *
16   * @since 1.5
17   *
18   * @author Rosanna Lee
19   * @author Rob Weltman
20   */

21 public class RealmChoiceCallback extends ChoiceCallback JavaDoc {
22
23     /**
24      * Constructs a <tt>RealmChoiceCallback</tt> with a prompt, a list of
25      * choices and a default choice.
26      *
27      * @param prompt the non-null prompt to use to request the realm.
28      * @param choices the non-null list of realms to choose from.
29      * @param defaultChoice the choice to be used as the default choice
30      * when the list of choices is displayed. It is an index into
31      * the <tt>choices</tt> arary.
32      * @param multiple true if multiple choices allowed; false otherwise
33      * @throws IllegalArgumentException If <tt>prompt</tt> is null or the empty string,
34      * if <tt>choices</tt> has a length of 0, if any element from
35      * <tt>choices</tt> is null or empty, or if <tt>defaultChoice</tt>
36      * does not fall within the array boundary of <tt>choices</tt>
37      */

38     public RealmChoiceCallback(String JavaDoc prompt, String JavaDoc[]choices,
39     int defaultChoice, boolean multiple) {
40     super(prompt, choices, defaultChoice, multiple);
41     }
42
43     private static final long serialVersionUID = -8588141348846281332L;
44 }
45
Popular Tags