Class TargetingFilter
- java.lang.Object
-
- com.azure.spring.cloud.feature.manager.feature.filters.TargetingFilter
-
- All Implemented Interfaces:
FeatureFilter
public class TargetingFilter extends Object implements FeatureFilter
`Microsoft.TargetingFilter` enables evaluating a user/group/overall rollout of a feature.
-
-
Constructor Summary
Constructors Constructor Description TargetingFilter(ITargetingContextAccessor contextAccessor)`Microsoft.TargetingFilter` evaluates a user/group/overall rollout of a feature.TargetingFilter(ITargetingContextAccessor contextAccessor, TargetingEvaluationOptions options)`Microsoft.TargetingFilter` evaluates a user/group/overall rollout of a feature.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanevaluate(FeatureFilterEvaluationContext context)Evaluates if the filter is on or off.
-
-
-
Constructor Detail
-
TargetingFilter
public TargetingFilter(ITargetingContextAccessor contextAccessor)
`Microsoft.TargetingFilter` evaluates a user/group/overall rollout of a feature.- Parameters:
contextAccessor- Context for evaluating the users/groups.
-
TargetingFilter
public TargetingFilter(ITargetingContextAccessor contextAccessor, TargetingEvaluationOptions options)
`Microsoft.TargetingFilter` evaluates a user/group/overall rollout of a feature.- Parameters:
contextAccessor- Context for evaluating the users/groups.options- enables customization of the filter.
-
-
Method Detail
-
evaluate
public boolean evaluate(FeatureFilterEvaluationContext context)
Description copied from interface:FeatureFilterEvaluates if the filter is on or off. Returning true results in Feature evaluation ending and returning true. Returning false results in the next Feature evaluation to continue.- Specified by:
evaluatein interfaceFeatureFilter- Parameters:
context- The context for whether or not the filter is passed.- Returns:
- True if the feature is enabled, false otherwise.
-
-