APIdia Launch Partner
Top Description Fields Constructors Methods
javax.security.sasl

public Class RealmChoiceCallback

extends ChoiceCallback
Class Inheritance
Imports
java.io.Serial, javax.security.auth.callback.ChoiceCallback

This callback is used by SaslClient and SaslServer to obtain a realm given a list of realm choices.
Authors
Rosanna Lee, Rob Weltman
Since
1.5

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
RealmChoiceCallback(String
the non-null prompt to use to request the realm.
prompt
,
String[]
the non-null list of realms to choose from.
choices
,
int
the choice to be used as the default choice when the list of choices is displayed. It is an index into the choices array.
defaultChoice
,
boolean
true if multiple choices allowed; false otherwise
multiple
)

Constructs a RealmChoiceCallback with a prompt, a list of choices and a default choice.

Method Summary

Inherited from javax.security.auth.callback.ChoiceCallback:
allowMultipleSelectionsgetChoicesgetDefaultChoicegetPromptgetSelectedIndexessetSelectedIndexsetSelectedIndexes

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.security.auth.callback.ChoiceCallback.serialVersionUID.

Annotations
@Serial

Constructor Detail

RealmChoiceCallbackback to summary
public RealmChoiceCallback(String prompt, String[] choices, int defaultChoice, boolean multiple)

Constructs a RealmChoiceCallback with a prompt, a list of choices and a default choice.

Parameters
prompt:String

the non-null prompt to use to request the realm.

choices:String[]

the non-null list of realms to choose from.

defaultChoice:int

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:boolean

true if multiple choices allowed; false otherwise

Exceptions
IllegalArgumentException:
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