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

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:


    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 Type
    Method
    Description
    default boolean
    Determine if this callback is optional.
    default boolean
    Determine if this callback is requesting information.
  • Method Details

    • 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