Events

public final class Events

Utility class for working with Event objects.

Functions

Link copied to clipboard
public static EventId checkValid(EventId id)
Ensures that the passed ID is valid.
Link copied to clipboard
public static EventMessage ensureMessage(Message eventOrMessage)
Extracts an event message if the passed instance is an Event object or Any, otherwise returns the passed message.
Link copied to clipboard
public static EventId generateId()
Creates a new EventId based on random UUID.
Link copied to clipboard
public static Stringifier<EventId> idStringifier()
Obtains the stringifier for event IDs.
Link copied to clipboard
public static Iterable<M> nothing<M extends EventMessage>()
Creates an empty Iterable over the messages of the type <M>.
Link copied to clipboard
public static Event toExternal(Event event)
Marks the given event as external.
public static ImmutableList<Event> toExternal(List<Event> events)
Marks all the given events as external.