FeatureSignals

Java SDK

Thread-safe client for evaluating feature flags in Java applications.

Installation

xml
<dependency>
  <groupId>com.featuresignals</groupId>
  <artifactId>sdk-java</artifactId>
  <version>0.1.0</version>
</dependency>

Requirements: Java 17+

Quick Start

java
import com.featuresignals.sdk.*;

var options = new ClientOptions("production")
    .baseURL("https://api.featuresignals.com");

var client = new FeatureSignalsClient("fs_srv_your_api_key", options);
client.waitForReady(5000);

var ctx = new EvalContext("user-123")
    .withAttribute("country", "US")
    .withAttribute("plan", "enterprise");

boolean enabled = client.boolVariation("new-feature", ctx, false);
System.out.println("Feature enabled: " + enabled);

client.close();

Variation Methods

java
// Boolean
boolean enabled = client.boolVariation("flag-key", ctx, false);

// String
String theme = client.stringVariation("theme", ctx, "light");

// Number (returns double)
double limit = client.numberVariation("rate-limit", ctx, 100.0);

// JSON
MyConfig config = client.jsonVariation("feature-config", ctx, defaultConfig);

Next Steps