DispatchOutcomes

public final class DispatchOutcomes

A utility for working with DispatchOutcome instances.

Functions

Link copied to clipboard
public static DispatchOutcome maybeSentToInbox<I>(SignalEnvelope<? extends Object, ? extends Object, ? extends Object> signal, Optional<I> entityId)
Returns an outcome, which tells that the passed signal was intended to be sent to the inbox of the entity with the passed ID.
Link copied to clipboard
public static DispatchOutcome publishedToRemote(EventEnvelope event)
Returns an outcome signifying that the given event has been published to a remote channel, most likely, to another Bounded Context.
Link copied to clipboard
public static DispatchOutcome sentToInbox<I>(EventEnvelope event, Set<I> entityIds)
Returns an outcome, which tells that the passed event was sent to several inboxes of entities with the passed identifiers.
public static DispatchOutcome sentToInbox<I>(SignalEnvelope<? extends Object, ? extends Object, ? extends Object> signal, I entityId)
Returns an outcome, which tells that the passed signal was sent to the inbox of the entity with the passed ID.
Link copied to clipboard
public static DispatchOutcome successfulOutcome(MessageId messageId)
Returns an outcome, which tells about a successful dispatching of the message with the passed ID.
public static DispatchOutcome successfulOutcome(CommandEnvelope command)
Returns an outcome, which tells about a successful dispatching of the passed command envelope.
public static DispatchOutcome successfulOutcome(EventEnvelope event)
Returns an outcome, which tells about a successful dispatching of the passed event envelope.