io.fluxcapacitor.javaclient.publishing.MetricsGateway Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Default Java client library for interfacing with Flux Capacitor.
package io.fluxcapacitor.javaclient.publishing;
import io.fluxcapacitor.common.api.Metadata;
import io.fluxcapacitor.javaclient.common.Message;
public interface MetricsGateway {
default void publish(Object metrics) {
if (metrics instanceof Message) {
publish(((Message) metrics).getPayload(), ((Message) metrics).getMetadata());
} else {
publish(metrics, Metadata.empty());
}
}
void publish(Object payload, Metadata metadata);
}