Package org.togglz.core.context
Class FeatureContext
java.lang.Object
org.togglz.core.context.FeatureContext
This class is typically used to obtain the
FeatureManager
from application code. It uses the
FeatureManagerProvider
to find the correct FeatureManager and caches it for each context class loader.- Author:
- Christian Kaltepoth
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
static FeatureManager
Returns theFeatureManager
for the current application (context class loader).static FeatureManager
Returns theFeatureManager
for the current application (context class loader).
-
Constructor Details
-
FeatureContext
public FeatureContext()
-
-
Method Details
-
getFeatureManager
Returns theFeatureManager
for the current application (context class loader). The method uses theFeatureManagerProvider
SPI to find the correctFeatureManager
instance. It will throw a runtime exception if noFeatureManager
can be found.- Returns:
- The
FeatureManager
for the application, nevernull
-
getFeatureManagerOrNull
Returns theFeatureManager
for the current application (context class loader). The method uses theFeatureManagerProvider
SPI to find the correctFeatureManager
instance. If not manager could be found,null
is returned.- Returns:
- The
FeatureManager
for the application ornull
-
clearCache
public static void clearCache()
-