Class Feature<T extends ApplicationSession<T>>
java.lang.Object
com.yubico.yubikit.core.application.Feature<T>
- Type Parameters:
T
- The type of Session for which the Feature is relevant.
- Direct Known Subclasses:
Feature.Versioned
public abstract class Feature<T extends ApplicationSession<T>>
extends java.lang.Object
A feature for a YubiKey application, which may not be supported by all YubiKeys.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Feature.Versioned<T extends ApplicationSession<T>>
A Feature which has a minimum version which it checks against. -
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
featureName
-
Constructor Summary
Constructors Modifier Constructor Description protected
Feature(java.lang.String featureName)
-
Method Summary
Modifier and Type Method Description java.lang.String
getFeatureName()
Get a human readable name of the feature.protected java.lang.String
getRequiredMessage()
abstract boolean
isSupportedBy(Version version)
Checks if the Feature is supported by the given Application version.
-
Field Details
-
featureName
protected final java.lang.String featureName
-
-
Constructor Details
-
Feature
protected Feature(java.lang.String featureName)
-
-
Method Details
-
getFeatureName
public java.lang.String getFeatureName()Get a human readable name of the feature.- Returns:
- the name of the feature
-
isSupportedBy
Checks if the Feature is supported by the given Application version.- Parameters:
version
- the version of the Application to check support for.- Returns:
- true if the Feature is supported, false if not
-
getRequiredMessage
protected java.lang.String getRequiredMessage()
-