Class DefaultMetricsGateway

java.lang.Object
io.fluxzero.sdk.publishing.DefaultMetricsGateway
All Implemented Interfaces:
MetricsGateway, HasLocalHandlers

public class DefaultMetricsGateway extends Object implements MetricsGateway
Default implementation of the MetricsGateway interface.

This class delegates all functionality to an underlying GenericGateway instance, enabling the use of metrics gateway methods while leveraging the generic gateway's capabilities.

See Also:
  • Constructor Details

    • DefaultMetricsGateway

      public DefaultMetricsGateway()
  • Method Details

    • publish

      public CompletableFuture<Void> publish(Object payload, io.fluxzero.common.api.Metadata metadata, io.fluxzero.common.Guarantee guarantee)
      Description copied from interface: MetricsGateway
      Publishes a metrics message with the specified metadata and delivery guarantee.

      This method may complete asynchronously.

      Specified by:
      publish in interface MetricsGateway
      Parameters:
      payload - the metrics payload
      metadata - metadata to attach to the message
      guarantee - delivery guarantee (e.g., Guarantee.SENT or Guarantee.STORED)
      Returns:
      a CompletableFuture that completes when the message is published (or not, depending on the guarantee)