Skip to content

Latest commit

 

History

History
45 lines (34 loc) · 1.32 KB

README.md

File metadata and controls

45 lines (34 loc) · 1.32 KB

The Unleash Client 4 Java

Build Status Coverage Status

Create a new a Unleash instance

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);

Awesome feature toggle API

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)

Development

Build:

mvn clean install

Cobertura coverage reports:

mvn cobertura:cobertura -DcoberturaFormat=html

The generated report will be available at target/site/cobertura/index.html