Class ExclusiveNameCallback
- java.lang.Object
-
- javax.security.auth.callback.NameCallback
-
- org.wildfly.security.auth.callback.ExclusiveNameCallback
-
- All Implemented Interfaces:
Serializable,Callback,ExtendedCallback
public class ExclusiveNameCallback extends NameCallback implements ExtendedCallback
A variation onNameCallbackwhich allows exclusive access to the backing identity to be requested.- Author:
- Farah Juma
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ExclusiveNameCallback(String prompt, boolean needsExclusiveAccess, boolean optional)Construct a new instance.ExclusiveNameCallback(String prompt, String defaultName, boolean needsExclusiveAccess, boolean optional)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasExclusiveAccess()Determine if exclusive access to the backing identity was granted.booleanisOptional()Determine if this callback is optional.booleanneedsExclusiveAccess()Determine if exclusive access to the backing identity is required.booleanneedsInformation()Determine if this callback is requesting information.voidsetExclusiveAccess(boolean exclusiveAccess)Set whether exclusive access to the backing identity was granted.-
Methods inherited from class javax.security.auth.callback.NameCallback
getDefaultName, getName, getPrompt, setName
-
-
-
-
Constructor Detail
-
ExclusiveNameCallback
public ExclusiveNameCallback(String prompt, boolean needsExclusiveAccess, boolean optional)
Construct a new instance.- Parameters:
prompt- the text prompt (must not benull)needsExclusiveAccess-trueif exclusive access to the backing identity is requiredoptional-trueif the support for the callback is optional
-
ExclusiveNameCallback
public ExclusiveNameCallback(String prompt, String defaultName, boolean needsExclusiveAccess, boolean optional)
Construct a new instance.- Parameters:
prompt- the text prompt (must not benull)defaultName- the name to be used as the default name displayed with the promptneedsExclusiveAccess-trueif exclusive access to the backing identity is requiredoptional-trueif the support for the callback is optional
-
-
Method Detail
-
needsExclusiveAccess
public boolean needsExclusiveAccess()
Determine if exclusive access to the backing identity is required.- Returns:
trueif exclusive access to the backing identity is required,falseotherwise
-
hasExclusiveAccess
public boolean hasExclusiveAccess()
Determine if exclusive access to the backing identity was granted.- Returns:
trueif exclusive access to the backing identity was granted,falseotherwise
-
setExclusiveAccess
public void setExclusiveAccess(boolean exclusiveAccess)
Set whether exclusive access to the backing identity was granted.- Parameters:
exclusiveAccess-trueif exclusive access to the backing identity was granted,falseotherwise
-
isOptional
public boolean isOptional()
Description copied from interface:ExtendedCallbackDetermine if this callback is optional.- Specified by:
isOptionalin interfaceExtendedCallback- Returns:
trueif the callback is optional,falseif it is mandatory
-
needsInformation
public boolean needsInformation()
Description copied from interface:ExtendedCallbackDetermine if this callback is requesting information.- Specified by:
needsInformationin interfaceExtendedCallback- Returns:
trueif the callback is requesting information,falseif it is only providing information
-
-