Interface ReloadablePkiCredential

All Superinterfaces:
PkiCredential
All Known Implementing Classes:
AbstractReloadablePkiCredential, KeyStoreCredential, ManagedPkiCredential, Pkcs11Credential

public interface ReloadablePkiCredential extends PkiCredential
An interface for credentials are "testable" and "reloadable".
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Method Details

    • getTestFunction

      @Nullable Supplier<Exception> getTestFunction()
      A credential may be monitored to ensure that it is functional. This can be useful when using for example credentials residing on hardware devices where the connection may be lost. If a credential implementation should be "testable" it must return a function for testing itself. This function (Supplier) returns an Exception for test failures and null for success.

      A credential that returns a function should also implement the reload() method.

      Returns:
      a function for testing the credential, or null if no test function is available
    • reload

      void reload() throws Exception
      Some implementations of key pairs, such as HSM-based, may need to be reloaded. This is done by implementing this method.
      Throws:
      Exception - for reloading errors