It is really easy to get a new instance of Unleash. In your app you typically just want one instance,
and inject that where you need it. You will typically use a dependency injection frameworks such as
Spring or Guice to manage this.
You create a new instance with the following command:
URI unleashServer = URI.create("http://unelash.finn.no")
Unleash unleash = new DefaultUnleash(unleashServer);
It is really simple to use unleash.
if(unleash.isEnabled("AwesomeFeature")) {
//do some magic
} else {
//do old boring stuff
}
I need a trueish default value in case the feature toggle is not defined, or the unleash-server is unavailable:
unleash.isEnabled("AwesomeFeature", true)
Build:
mvn clean install
Cobertura coverage reports:
mvn cobertura:cobertura -DcoberturaFormat=html
The generated report will be available at target/site/cobertura/index.html