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 onNameCallback
which 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 boolean
hasExclusiveAccess()
Determine if exclusive access to the backing identity was granted.boolean
isOptional()
Determine if this callback is optional.boolean
needsExclusiveAccess()
Determine if exclusive access to the backing identity is required.boolean
needsInformation()
Determine if this callback is requesting information.void
setExclusiveAccess(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
-true
if exclusive access to the backing identity is requiredoptional
-true
if 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
-true
if exclusive access to the backing identity is requiredoptional
-true
if the support for the callback is optional
-
-
Method Detail
-
needsExclusiveAccess
public boolean needsExclusiveAccess()
Determine if exclusive access to the backing identity is required.- Returns:
true
if exclusive access to the backing identity is required,false
otherwise
-
hasExclusiveAccess
public boolean hasExclusiveAccess()
Determine if exclusive access to the backing identity was granted.- Returns:
true
if exclusive access to the backing identity was granted,false
otherwise
-
setExclusiveAccess
public void setExclusiveAccess(boolean exclusiveAccess)
Set whether exclusive access to the backing identity was granted.- Parameters:
exclusiveAccess
-true
if exclusive access to the backing identity was granted,false
otherwise
-
isOptional
public boolean isOptional()
Description copied from interface:ExtendedCallback
Determine if this callback is optional.- Specified by:
isOptional
in interfaceExtendedCallback
- Returns:
true
if the callback is optional,false
if it is mandatory
-
needsInformation
public boolean needsInformation()
Description copied from interface:ExtendedCallback
Determine if this callback is requesting information.- Specified by:
needsInformation
in interfaceExtendedCallback
- Returns:
true
if the callback is requesting information,false
if it is only providing information
-
-