EventDispatch

public final class EventDispatch<I, E extends TransactionalEntity<I, ? extends Object, ? extends Object>>

A dispatch of the event to the appropriate handler of an entity.

Unlike the io.spine.server.command.DispatchCommand, this class is a simple wrapper around the BiFunction which performs an actual event dispatch.

Parameters

<I>

the type of entity ID

<E>

the type of entity

Constructors

Link copied to clipboard
public void EventDispatch(BiFunction<E, EventEnvelope, DispatchOutcome> dispatchFunction, E entity, EventEnvelope event)
Creates a new EventDispatch from the given dispatch function.

Functions

Link copied to clipboard
public E entity()
Returns the entity to which the event is dispatched.
Link copied to clipboard
Returns the dispatched event.
Link copied to clipboard
public DispatchOutcome perform()
Executes the dispatch operation, returning its result.