Package org.wildfly.security.evidence
Interface AlgorithmEvidence
-
- All Superinterfaces:
Evidence
- All Known Implementing Classes:
X509PeerCertificateChainEvidence
public interface AlgorithmEvidence extends Evidence
A piece of evidence which supports multiple algorithms.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <E extends Evidence,R>
RcastAndApply(Class<E> evidenceType, String algorithmName, Function<E,R> function)
Cast this evidence type and apply a function if the type matches.String
getAlgorithm()
Get the algorithm name associated with this evidence (will never benull
).-
Methods inherited from interface org.wildfly.security.evidence.Evidence
castAndApply, castAs, castAs, getDecodedPrincipal, getDefaultPrincipal, getPrincipal, setDecodedPrincipal
-
-
-
-
Method Detail
-
getAlgorithm
String getAlgorithm()
Get the algorithm name associated with this evidence (will never benull
).- Returns:
- the algorithm name
-
castAndApply
default <E extends Evidence,R> R castAndApply(Class<E> evidenceType, String algorithmName, Function<E,R> function)
Description copied from interface:Evidence
Cast this evidence type and apply a function if the type matches.- Specified by:
castAndApply
in interfaceEvidence
- Type Parameters:
E
- the evidence typeR
- the return type- Parameters:
evidenceType
- the evidence type class to checkalgorithmName
- the name of the algorithm ornull
if any algorithm is acceptablefunction
- the function to apply- Returns:
- the result of the function, or
null
if the evidence is not of the given type
-
-