public class NoOpProvider extends Object implements FeatureProvider
FeatureProvider that simply returns the default values passed to it.| Modifier and Type | Field and Description |
|---|---|
static String |
PASSED_IN_DEFAULT |
| Constructor and Description |
|---|
NoOpProvider() |
| Modifier and Type | Method and Description |
|---|---|
ProviderEvaluation<Boolean> |
getBooleanEvaluation(String key,
Boolean defaultValue,
EvaluationContext ctx) |
ProviderEvaluation<Double> |
getDoubleEvaluation(String key,
Double defaultValue,
EvaluationContext ctx) |
ProviderEvaluation<Integer> |
getIntegerEvaluation(String key,
Integer defaultValue,
EvaluationContext ctx) |
Metadata |
getMetadata() |
ProviderEvaluation<Value> |
getObjectEvaluation(String key,
Value defaultValue,
EvaluationContext invocationContext) |
ProviderState |
getState()
Returns a representation of the current readiness of the provider.
|
ProviderEvaluation<String> |
getStringEvaluation(String key,
String defaultValue,
EvaluationContext ctx) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProviderHooks, initialize, shutdownpublic static final String PASSED_IN_DEFAULT
public ProviderState getState()
FeatureProviderProviderState.NOT_READY.
If the provider is in an error state, it should return ProviderState.ERROR.
If the provider is functioning normally, it should return ProviderState.READY.
Providers which do not implement this method are assumed to be ready immediately.
getState in interface FeatureProviderpublic Metadata getMetadata()
getMetadata in interface FeatureProviderpublic ProviderEvaluation<Boolean> getBooleanEvaluation(String key, Boolean defaultValue, EvaluationContext ctx)
getBooleanEvaluation in interface FeatureProviderpublic ProviderEvaluation<String> getStringEvaluation(String key, String defaultValue, EvaluationContext ctx)
getStringEvaluation in interface FeatureProviderpublic ProviderEvaluation<Integer> getIntegerEvaluation(String key, Integer defaultValue, EvaluationContext ctx)
getIntegerEvaluation in interface FeatureProviderpublic ProviderEvaluation<Double> getDoubleEvaluation(String key, Double defaultValue, EvaluationContext ctx)
getDoubleEvaluation in interface FeatureProviderpublic ProviderEvaluation<Value> getObjectEvaluation(String key, Value defaultValue, EvaluationContext invocationContext)
getObjectEvaluation in interface FeatureProviderCopyright © 2023. All rights reserved.