Class UserAwareFakeUnleash
- java.lang.Object
-
- com.example.chaos.monkey.toggledemo.UserAwareFakeUnleash
-
- All Implemented Interfaces:
no.finn.unleash.Unleash
public class UserAwareFakeUnleash extends Object implements no.finn.unleash.Unleash
Note implementing your own Unleash isn't typically needed. But for the purpose of this demo I am creating one so we can use FakeUnleash but still demonstrate using a Context.
-
-
Constructor Summary
Constructors Constructor Description UserAwareFakeUnleash(no.finn.unleash.UnleashContextProvider contextProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidenable(String featureName)List<String>getFeatureToggleNames()no.finn.unleash.VariantgetVariant(String s)no.finn.unleash.VariantgetVariant(String s, no.finn.unleash.UnleashContext unleashContext)no.finn.unleash.VariantgetVariant(String s, no.finn.unleash.UnleashContext unleashContext, no.finn.unleash.Variant variant)no.finn.unleash.VariantgetVariant(String s, no.finn.unleash.Variant variant)booleanisEnabled(String toggleName)booleanisEnabled(String s, boolean b)no.finn.unleash.MoreOperationsmore()
-
-
-
Method Detail
-
enable
public void enable(String featureName)
-
isEnabled
public boolean isEnabled(String toggleName)
- Specified by:
isEnabledin interfaceno.finn.unleash.Unleash
-
isEnabled
public boolean isEnabled(String s, boolean b)
- Specified by:
isEnabledin interfaceno.finn.unleash.Unleash
-
getVariant
public no.finn.unleash.Variant getVariant(String s, no.finn.unleash.UnleashContext unleashContext)
- Specified by:
getVariantin interfaceno.finn.unleash.Unleash
-
getVariant
public no.finn.unleash.Variant getVariant(String s, no.finn.unleash.UnleashContext unleashContext, no.finn.unleash.Variant variant)
- Specified by:
getVariantin interfaceno.finn.unleash.Unleash
-
getVariant
public no.finn.unleash.Variant getVariant(String s)
- Specified by:
getVariantin interfaceno.finn.unleash.Unleash
-
getVariant
public no.finn.unleash.Variant getVariant(String s, no.finn.unleash.Variant variant)
- Specified by:
getVariantin interfaceno.finn.unleash.Unleash
-
getFeatureToggleNames
public List<String> getFeatureToggleNames()
- Specified by:
getFeatureToggleNamesin interfaceno.finn.unleash.Unleash
-
more
public no.finn.unleash.MoreOperations more()
- Specified by:
morein interfaceno.finn.unleash.Unleash
-
-