Class DefaultMetricsGateway
java.lang.Object
io.fluxzero.sdk.publishing.DefaultMetricsGateway
- All Implemented Interfaces:
MetricsGateway, HasLocalHandlers
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 Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HasLocalHandlers
hasLocalHandlers, registerHandler, registerHandler, setSelfHandlerFilterMethods inherited from interface MetricsGateway
publish, publish
-
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:MetricsGatewayPublishes a metrics message with the specified metadata and delivery guarantee.This method may complete asynchronously.
- Specified by:
publishin interfaceMetricsGateway- Parameters:
payload- the metrics payloadmetadata- metadata to attach to the messageguarantee- delivery guarantee (e.g.,Guarantee.SENTorGuarantee.STORED)- Returns:
- a
CompletableFuturethat completes when the message is published (or not, depending on the guarantee)
-