RealmChoiceCallback (Java SE 11 & JDK 11 ) (original) (raw)
- javax.security.auth.callback.ChoiceCallback
- javax.security.sasl.RealmChoiceCallback
All Implemented Interfaces:
[Serializable](../../../../java.base/java/io/Serializable.html "interface in java.io")
,[Callback](../../../../java.base/javax/security/auth/callback/Callback.html "interface in javax.security.auth.callback")
public class RealmChoiceCallback
extends ChoiceCallback
This callback is used by SaslClient
and SaslServer
to obtain a realm given a list of realm choices.
Since:
1.5
See Also:
Serialized Form
Constructor Summary
Constructors
Constructor Description RealmChoiceCallback(String prompt,String[] choices, int defaultChoice, boolean multiple) Constructs a RealmChoiceCallback with a prompt, a list of choices and a default choice. Method Summary
* ### Methods declared in class javax.security.auth.callback.[ChoiceCallback](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html "class in javax.security.auth.callback") `[allowMultipleSelections](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html#allowMultipleSelections%28%29), [getChoices](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html#getChoices%28%29), [getDefaultChoice](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html#getDefaultChoice%28%29), [getPrompt](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html#getPrompt%28%29), [getSelectedIndexes](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html#getSelectedIndexes%28%29), [setSelectedIndex](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html#setSelectedIndex%28int%29), [setSelectedIndexes](../../../../java.base/javax/security/auth/callback/ChoiceCallback.html#setSelectedIndexes%28int%5B%5D%29)` * ### Methods declared in class java.lang.[Object](../../../../java.base/java/lang/Object.html "class in java.lang") `[clone](../../../../java.base/java/lang/Object.html#clone%28%29), [equals](../../../../java.base/java/lang/Object.html#equals%28java.lang.Object%29), [finalize](../../../../java.base/java/lang/Object.html#finalize%28%29), [getClass](../../../../java.base/java/lang/Object.html#getClass%28%29), [hashCode](../../../../java.base/java/lang/Object.html#hashCode%28%29), [notify](../../../../java.base/java/lang/Object.html#notify%28%29), [notifyAll](../../../../java.base/java/lang/Object.html#notifyAll%28%29), [toString](../../../../java.base/java/lang/Object.html#toString%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long%29), [wait](../../../../java.base/java/lang/Object.html#wait%28long,int%29)`
Constructor Detail
* #### RealmChoiceCallback public RealmChoiceCallback([String](../../../../java.base/java/lang/String.html "class in java.lang") prompt, [String](../../../../java.base/java/lang/String.html "class in java.lang")[] choices, int defaultChoice, boolean multiple) Constructs a `RealmChoiceCallback` with a prompt, a list of choices and a default choice. Parameters: `prompt` \- the non-null prompt to use to request the realm. `choices` \- the non-null list of realms to choose from. `defaultChoice` \- the choice to be used as the default choice when the list of choices is displayed. It is an index into the `choices` array. `multiple` \- true if multiple choices allowed; false otherwise Throws: `[IllegalArgumentException](../../../../java.base/java/lang/IllegalArgumentException.html "class in java.lang")` \- If `prompt` is null or the empty string, if `choices` has a length of 0, if any element from`choices` is null or empty, or if `defaultChoice` does not fall within the array boundary of `choices`
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.