Skip to content

About

Java SDK for Mozhno Feature Flags — evaluate feature flags from any JVM application

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Mozhno Java SDK

Maven Central License

Feature flag evaluation for any JVM application — local, no-network-per-check, fail-closed.

Installation

Gradle

repositories {
    mavenCentral()
}

dependencies {
    implementation 'dev.mozhno:mozhno-client-java:1.1.2'
}

Maven

<dependency>
  <groupId>dev.mozhno</groupId>
  <artifactId>mozhno-client-java</artifactId>
  <version>1.1.2</version>
</dependency>

Quick Start

var config = MozhnoConfig.builder()
    .appName("my-app")
    .instanceId("instance-1")
    .mozhnoUrl("https://flags.example.com")
    .apiKey("env-abc123")
    .build();

var client = new DefaultMozhnoClient(config);
client.start();

var ctx = MozhnoContext.builder().userId("42").build();
boolean on = client.isEnabled("new-checkout", ctx);

Features

  • Evaluate locally — flags are fetched once and evaluated in-memory. No network call per isEnabled().
  • Fail-closed — missing flags or fetch failures return false (or your default), never throw.
  • Server + client modes — full flag set for server-side apps; pre-evaluated toggles for client-side.
  • Spring Boot auto-configuration — auto-wire a MozhnoClient from application.yml properties.
  • FakeMozhnoClient — in-memory implementation for tests. No HTTP, no server needed.

Configuration

Field Default Description
appName — (required) Application name registered in Mozhno
instanceId — (required) Unique instance identifier
apiKey — (required) Server/Client API key from Mozhno dashboard
mozhnoUrl — (required) URL of your Mozhno server
fetchTogglesInterval 15s How often to poll for flag updates
sendMetricsInterval 60s How often to flush metrics
disableMetrics false Disable usage metrics
synchronousFetchOnInitialisation false Block start() until first fetch completes

Requirements

  • JDK 17+

License

Apache 2.0 — see LICENSE.

About

Java SDK for Mozhno Feature Flags — evaluate feature flags from any JVM application

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages