Interface ExtendedCallback
-
- All Superinterfaces:
Callback
- All Known Implementing Classes:
AbstractCredentialCallback
,AnonymousAuthorizationCallback
,AuthenticationCompleteCallback
,AvailableRealmsCallback
,CachedIdentityAuthorizeCallback
,ChannelBindingCallback
,CredentialCallback
,CredentialUpdateCallback
,EvidenceDecodePrincipalCallback
,EvidenceVerifyCallback
,ExclusiveNameCallback
,ExtendedChoiceCallback
,IdentityCredentialCallback
,MechanismInformationCallback
,OptionalNameCallback
,ParameterCallback
,PasswordResetCallback
,PeerPrincipalCallback
,PrincipalAuthorizeCallback
,SecurityIdentityCallback
,SecurityLayerDisposedCallback
,ServerCredentialCallback
,SocketAddressCallback
,SSLCallback
,TrustedAuthoritiesCallback
public interface ExtendedCallback extends Callback
A callback which provides extended information about its usage.For example, the following code can be used to detect an optional callback instead of failing if the callback is unrecognized:
Or, the utility method inif (callback instanceof ExtendedCallback && ((ExtendedCallback) callback).isOptional()) { // The callback is harmless return; } // Let the caller know that we failed to support this callback throw new UnsupportedCallbackException(callback);
CallbackUtil
can be used:CallbackUtils.unsupported(callback);
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
isOptional()
Determine if this callback is optional.default boolean
needsInformation()
Determine if this callback is requesting information.
-
-
-
Method Detail
-
isOptional
default boolean isOptional()
Determine if this callback is optional.- Returns:
true
if the callback is optional,false
if it is mandatory
-
needsInformation
default boolean needsInformation()
Determine if this callback is requesting information.- Returns:
true
if the callback is requesting information,false
if it is only providing information
-
-