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.StringgetAlgorithm()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:EvidenceCast this evidence type and apply a function if the type matches.- Specified by:
 castAndApplyin interfaceEvidence- Type Parameters:
 E- the evidence typeR- the return type- Parameters:
 evidenceType- the evidence type class to checkalgorithmName- the name of the algorithm ornullif any algorithm is acceptablefunction- the function to apply- Returns:
 - the result of the function, or 
nullif the evidence is not of the given type 
 
 - 
 
 -