Class AbstractReloadablePkiCredential
java.lang.Object
se.swedenconnect.security.credential.AbstractPkiCredential
se.swedenconnect.security.credential.AbstractReloadablePkiCredential
- All Implemented Interfaces:
PkiCredential
,ReloadablePkiCredential
- Direct Known Subclasses:
KeyStoreCredential
,ManagedPkiCredential
,Pkcs11Credential
public abstract class AbstractReloadablePkiCredential
extends AbstractPkiCredential
implements ReloadablePkiCredential
Abstract base class for reloadable credentials.
- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
Nested Class Summary
Nested classes/interfaces inherited from interface se.swedenconnect.security.credential.PkiCredential
PkiCredential.Metadata
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA credential may be monitored to ensure that it is functional.void
setTestFunction
(Function<ReloadablePkiCredential, Exception> testFunction) Assigns a test function for this credential.Methods inherited from class se.swedenconnect.security.credential.AbstractPkiCredential
getDefaultName, getMetadata, getName, getPublicKey, getStandalonePublicKey, setName, updateMetadataValidityProperties
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface se.swedenconnect.security.credential.PkiCredential
destroy, getCertificate, getCertificateChain, getMetadata, getName, getPrivateKey, getPublicKey, isHardwareCredential, transform
Methods inherited from interface se.swedenconnect.security.credential.ReloadablePkiCredential
reload
-
Constructor Details
-
AbstractReloadablePkiCredential
public AbstractReloadablePkiCredential()Default constructor.
-
-
Method Details
-
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 anException
for test failures andnull
for success.A credential that returns a function should also implement the
ReloadablePkiCredential.reload()
method.- Specified by:
getTestFunction
in interfaceReloadablePkiCredential
- Returns:
- a function for testing the credential, or
null
if no test function is available
-
setTestFunction
Assigns a test function for this credential.- Parameters:
testFunction
- the function
-