Interface PasswordCallback

  • All Superinterfaces:
    Supplier<String>
    All Known Implementing Classes:
    CryptCodecProvider
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface PasswordCallback
    extends Supplier<String>
    Callback which can be used by CryptCodecProvider to retrieve a password on demand, at the time it is required. The callback will only be invoked if it is determined that a file actually requires a password to be opened. This could be used to implement a password user prompt utility. Note, CryptCodecProvider now accepts a Supplier as the password callback, so this interface is no longer necessary (kept for historical compatibility).
    Author:
    James Ahlborn
    • Method Detail

      • getPassword

        String getPassword()
        Invoked by CryptCodecProvider when a password is necessary to open an access database.
        Returns:
        the required password