Class FeatureManager
java.lang.Object
com.azure.spring.cloud.feature.management.FeatureManager
Holds information on Feature Management properties and can check if a given feature is enabled.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the names of all features flagsChecks to see if the feature is enabled.isEnabledAsync(String feature) Checks to see if the feature is enabled.
-
Method Details
-
isEnabledAsync
Checks to see if the feature is enabled. If enabled it check each filter, once a single filter returns true it returns true. If no filter returns true, it returns false. If there are no filters, it returns true. If feature isn't found it returns false.- Parameters:
feature- Feature being checked.- Returns:
- state of the feature
- Throws:
FilterNotFoundException- file not found
-
isEnabled
Checks to see if the feature is enabled. If enabled it check each filter, once a single filter returns true it returns true. If no filter returns true, it returns false. If there are no filters, it returns true. If feature isn't found it returns false.- Parameters:
feature- Feature being checked.- Returns:
- state of the feature
- Throws:
FilterNotFoundException- file not found
-
getAllFeatureNames
Returns the names of all features flags- Returns:
- a set of all feature names
-