Interface EventPublisher

All Known Subinterfaces:
CommandEventPublisher<I>
All Known Implementing Classes:
CommandEventCapturer, EventCapturer

public interface EventPublisher
Interface specifying operations for publishing Java event objects. Implementations typically either capture these events in-memory for further (or deferred) processing or immediately convert and pass them to EsdbClient.write(List, List).
  • Method Summary

    Modifier and Type
    Method
    Description
    default <E> void
    publish(String subject, E event)
    Publishes the given event onto the given subject.
    default <E> void
    publish(String subject, E event, Map<String,?> metaData)
    Publishes the given event and its meta-data onto the given subject.
    <E> void
    publish(String subject, E event, Map<String,?> metaData, List<Precondition> preconditions)
    Publishes the given event and its meta-data onto the given subject with preconditions.
  • Method Details

    • publish

      default <E> void publish(String subject, E event)
      Publishes the given event onto the given subject. No meta-data, i.e. an empty map, is published with the event.
      Type Parameters:
      E - the generic event type
      Parameters:
      subject - the absolute subject path
      event - the event object
    • publish

      default <E> void publish(String subject, E event, Map<String,?> metaData)
      Publishes the given event and its meta-data onto the given subject.
      Type Parameters:
      E - the generic event type
      Parameters:
      subject - the absolute subject path
      event - the event object
      metaData - the event meta-data
    • publish

      <E> void publish(String subject, E event, Map<String,?> metaData, List<Precondition> preconditions)
      Publishes the given event and its meta-data onto the given subject with preconditions.
      Type Parameters:
      E - the generic event type
      Parameters:
      subject - the absolute subject path
      event - the event object
      metaData - the event meta-data
      preconditions - the preconditions that must not be violated