EventProducingRepository

public interface EventProducingRepository

Operations common for repositories that can post to EventBus.

Inheritors

Functions

Link copied to clipboard
public abstract EventBus eventBus()
Obtains the EventBus to which the repository posts.
Link copied to clipboard
public abstract EventFilter eventFilter()
Declared for mixing-in with eventFilter.
Link copied to clipboard
public Iterable<Event> filter(Collection<Event> events)
Filters passed events using the eventFilter filter} of this repository.
Link copied to clipboard
public abstract ImmutableSet<EventClass> outgoingEvents()
Obtains classes of the events produced by entities of this repository.
Link copied to clipboard
public void postEvents(Collection<Event> events)
Filters the passed events and posts the result to the EventBus.
Link copied to clipboard
public void postIfCommandRejected(SignalEnvelope<? extends Object, ? extends Object, ? extends Object> signal, Throwable cause)
If the passed signal is a command and the thrown cause is a rejection, posts the rejection to the associated EventBus.