Package org.togglz.core.bootstrap
Class FeatureManagerBootstrapper
java.lang.Object
org.togglz.core.bootstrap.FeatureManagerBootstrapper
This class is used to automatically bootstrap a FeatureManager for Togglz which is the default behavior for simple
web applications. The bootstrap process heavily relies on the BeanFinder SPI.
The bootstrapping process consists of the following steps:
- First try to locate an implementation of the
TogglzBootstrapinterface. If this lookup is successful, aFeatureManageris created from it and returned. - If the first step fails, the class will try to locate an implementation of the
TogglzConfiginterface. If an implementation is found, it is used to build aFeatureManagerusingFeatureManagerBuilder.togglzConfig(TogglzConfig)which will be returned to the caller.
- Author:
- Christian Kaltepoth
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateFeatureManager(Object context) Tries to automatically build and configure aFeatureManagerlike described above.
-
Constructor Details
-
FeatureManagerBootstrapper
public FeatureManagerBootstrapper()
-
-
Method Details
-
createFeatureManager
Tries to automatically build and configure aFeatureManagerlike described above.- Parameters:
context- An optional context object which is provided to theBeanFinderimplementations. This parameter is for example used in web application to supply the ServletContext.- Returns:
- A newly created
FeatureManager - Throws:
IllegalStateException- if the bootstrapping process failed
-