Interface ExtendedCallback
- All Superinterfaces:
Callback
- All Known Implementing Classes:
AbstractCredentialCallback,AnonymousAuthorizationCallback,AuthenticationCompleteCallback,AuthenticationConfigurationCallback,AvailableRealmsCallback,CachedIdentityAuthorizeCallback,ChannelBindingCallback,CredentialCallback,CredentialUpdateCallback,EvidenceDecodePrincipalCallback,EvidenceVerifyCallback,ExclusiveNameCallback,ExtendedChoiceCallback,IdentityCredentialCallback,MechanismInformationCallback,OptionalNameCallback,ParameterCallback,PasswordResetCallback,PeerPrincipalCallback,PrincipalAuthorizeCallback,RequestInformationCallback,SecurityIdentityCallback,SecurityLayerDisposedCallback,ServerCredentialCallback,SocketAddressCallback,SSLCallback,TrustedAuthoritiesCallback
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:
if (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);
Or, the utility method in CallbackUtil can be used:
CallbackUtils.unsupported(callback);
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanDetermine if this callback is optional.default booleanDetermine if this callback is requesting information.
-
Method Details
-
isOptional
default boolean isOptional()Determine if this callback is optional.- Returns:
trueif the callback is optional,falseif it is mandatory
-
needsInformation
default boolean needsInformation()Determine if this callback is requesting information.- Returns:
trueif the callback is requesting information,falseif it is only providing information
-