public interface Evidence
Modifier and Type | Method and Description |
---|---|
default <E extends Evidence,R> |
castAndApply(Class<E> evidenceType,
Function<E,R> function)
Cast this evidence type and apply a function if the type matches.
|
default <E extends Evidence,R> |
castAndApply(Class<E> evidenceType,
String algorithmName,
Function<E,R> function)
Cast this evidence type and apply a function if the type matches.
|
default <E extends Evidence> |
castAs(Class<E> evidenceType)
Cast this evidence type if the type matches.
|
default <E extends Evidence> |
castAs(Class<E> evidenceType,
String algorithmName)
Cast this evidence type if the type and algorithm matches.
|
default Principal |
getDecodedPrincipal()
Get the
Principal derived from this evidence using an evidence decoder (may be null ). |
default Principal |
getDefaultPrincipal()
Get the default
Principal associated with this evidence (may be null ). |
default Principal |
getPrincipal()
Deprecated.
Use
getDefaultPrincipal() or getDecodedPrincipal() instead. |
default void |
setDecodedPrincipal(Principal principal)
Set the
Principal derived from this evidence using an evidence decoder (may be null ). |
@Deprecated default Principal getPrincipal()
getDefaultPrincipal()
or getDecodedPrincipal()
instead.Principal
which can be derived from this evidence, this can be null
if there is no derived Principal.Principal
which can be derived from this evidence, this can be null
if there is no derived Principal.default Principal getDefaultPrincipal()
Principal
associated with this evidence (may be null
).Principal
associated with this evidence (may benull
)default Principal getDecodedPrincipal()
Principal
derived from this evidence using an evidence decoder (may be null
).Principal
derived from this evidence using an evidence decoder (may be null
)default void setDecodedPrincipal(Principal principal)
Principal
derived from this evidence using an evidence decoder (may be null
).
This method is a no-op by default. It is intended to be implemented by evidence types that can be
associated with a principal derived from an evidence decoder.principal
- the principal derived from this evidence using an evidence decoder (may be null
)default <E extends Evidence> E castAs(Class<E> evidenceType, String algorithmName)
E
- the evidence typeevidenceType
- the evidence type class to checkalgorithmName
- the name of the algorithm or null
if any algorithm is acceptablenull
if the evidence does not match the criteriadefault <E extends Evidence> E castAs(Class<E> evidenceType)
E
- the evidence typeevidenceType
- the evidence type class to checknull
if the evidence does not match the criteriadefault <E extends Evidence,R> R castAndApply(Class<E> evidenceType, String algorithmName, Function<E,R> function)
E
- the evidence typeR
- the return typeevidenceType
- the evidence type class to checkalgorithmName
- the name of the algorithm or null
if any algorithm is acceptablefunction
- the function to applynull
if the evidence is not of the given typedefault <E extends Evidence,R> R castAndApply(Class<E> evidenceType, Function<E,R> function)
E
- the evidence typeR
- the return typeevidenceType
- the evidence type class to checkfunction
- the function to applynull
if the evidence is not of the given typeCopyright © 2021 JBoss by Red Hat. All rights reserved.