Class DefaultEventGateway

java.lang.Object
io.fluxcapacitor.javaclient.publishing.DefaultEventGateway
All Implemented Interfaces:
EventGateway, HasLocalHandlers

public class DefaultEventGateway extends Object implements EventGateway
Default implementation of the EventGateway interface.

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

See Also:
  • Constructor Details

    • DefaultEventGateway

      public DefaultEventGateway()
  • Method Details

    • publish

      public CompletableFuture<Void> publish(Message message, Guarantee guarantee)
      Description copied from interface: EventGateway
      Publishes the given Message to Flux Capacitor and/or local handlers. Returns a future that completes when the message has been fully processed or stored according to the given Guarantee.
      Specified by:
      publish in interface EventGateway
      Parameters:
      message - the message to publish
      guarantee - the level of delivery guarantee to apply (e.g., store-before-acknowledge)
      Returns:
      a future that completes when the message has been handled
    • publish

      public void publish(Object... messages)
      Description copied from interface: EventGateway
      Publishes one or more event messages. Each message may be a raw payload or a Message instance. Events are published with no delivery guarantee.

      This method does not block for completion or acknowledgments.

      Specified by:
      publish in interface EventGateway
      Parameters:
      messages - the events to publish
    • publish

      public CompletableFuture<Void> publish(Guarantee guarantee, Object... messages)
      Description copied from interface: EventGateway
      Publishes one or more event messages with a specific delivery guarantee. Each message may be a raw payload or a Message instance.

      Returns a future that completes when the messages have been handled or stored according to the specified Guarantee.

      Specified by:
      publish in interface EventGateway
      Parameters:
      guarantee - the delivery guarantee (e.g., Guarantee.STORED)
      messages - the events to publish
      Returns:
      a future that completes upon publishing