EventEnvelope

public final class EventEnvelope extends AbstractMessageEnvelope<I, T, C> implements SignalEnvelope<I, T, C>, EnrichableMessageEnvelope<I, T, M, C, E>

The holder of an Event which provides convenient access to its properties.

Functions

Link copied to clipboard
public EventContext context()
Obtains the context of the event.
Link copied to clipboard
public EventId id()
Obtains the event ID.
Link copied to clipboard
public final boolean isEnrichmentEnabled()
Verifies if the enrichment of the message is enabled.
Link copied to clipboard
public boolean isExternal()
Returns true is the wrapped event is external, false otherwise.
Link copied to clipboard
public boolean isRejection()
Returns true if the wrapped event is a rejection, false otherwise.
Link copied to clipboard
public EventMessage message()
Obtains the event message.
Link copied to clipboard
Obtains the class of the event.
Link copied to clipboard
public TypeName messageTypeName()
Obtains the type of the event message.
Link copied to clipboard
public static EventEnvelope of(Event event)
Creates instance for the passed event.
Link copied to clipboard
public MessageClass originClass()
Obtains the class of the origin message if available.
Link copied to clipboard
public TenantId tenantId()
Obtains tenant ID of the event.
Link copied to clipboard
public EventEnvelope toEnriched(EnrichmentService<EventMessage, EventContext> service)
Creates a copy with the envelope adding enrichments to the context of the message.
Link copied to clipboard
public TypeUrl typeUrl()
Obtains the type URL of the event message.

Inherited functions

Link copied to clipboard
public ActorContext actorContext()
Obtains an actor context for the wrapped message.
Link copied to clipboard
public Origin asMessageOrigin()
Packs this message as an Origin of an event.
Link copied to clipboard
public boolean equals(Object obj)
Link copied to clipboard
public int hashCode()
Link copied to clipboard
public MessageId messageId()
Obtains the message ID of the signal.
Link copied to clipboard
public T outerObject()
Obtains the object which contains the message of interest.
Link copied to clipboard
public String toString()