Class DefaultErrorGateway

java.lang.Object
io.fluxcapacitor.javaclient.publishing.DefaultErrorGateway
All Implemented Interfaces:
ErrorGateway, HasLocalHandlers

public class DefaultErrorGateway extends Object implements ErrorGateway
Default implementation of the ErrorGateway interface.

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

See Also:
  • Constructor Details

    • DefaultErrorGateway

      public DefaultErrorGateway()
  • Method Details

    • report

      public CompletableFuture<Void> report(Object payload, Metadata metadata, Guarantee guarantee)
      Description copied from interface: ErrorGateway
      Reports an error with the given payload, metadata, and delivery guarantee.

      Returns a future that completes once the error message is sent or stored based on the provided guarantee.

      Specified by:
      report in interface ErrorGateway
      Parameters:
      payload - the error payload
      metadata - metadata describing the context of the error
      guarantee - whether to ensure message is sent (Guarantee.SENT) or stored (Guarantee.STORED)
      Returns:
      a future that completes once the message has been handled appropriately