Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public interface MetricReader

Known subtypesOtlpMetricExporter

Something that reads Metrics periodically and sends them somewhere – the OTLP exporter. Installed by the generated entry point of a build that enables OpenTelemetry, and referenced nowhere else, so a build that does not leaves the exporter out of the binary.

Methods

public abstract boolean open(Config config) throws IOExceptionReads the configuration and starts.
public abstract void shutdown(int timeoutMillis)Sends what is left and stops, waiting up to timeoutMillis.

Method details

open

public abstract boolean open(Config config) throws IOException
Reads the configuration and starts. Answers false when the deployment has metrics turned off, in which case nothing is started; one that throws must leave nothing started either, and changes nothing it was already doing – the server does not shut down a reader whose open() failed.

shutdown

public abstract void shutdown(int timeoutMillis)
Sends what is left and stops, waiting up to timeoutMillis.