EventEnricher

public final class EventEnricher extends Enricher<M, C>

Enriches events after they are stored, and before they are dispatched.

Enrichment schema is constructed like this:


  Enricher enricher = Enricher
      .newBuilder()
      .add(MyEvent.class, MyEnrichment.class,
           new EventEnrichmentFn<MyEvent, EventContext, MyEnrichment> { ... } )
      ...
      .build();

Types

Link copied to clipboard
public final class Builder extends EnricherBuilder<M, C, B>
The builder for EventEnricher.

Functions

Link copied to clipboard
Creates a new builder.

Inherited functions

Link copied to clipboard
public Optional<Enrichment> createEnrichment(M message, C context)
Creates an enrichment for the passed message.
Link copied to clipboard
public E enrich<E extends EnrichableMessageEnvelope<? extends Object, ? extends Object, M, C, E>>(E source)
Enriches the passed message if it can be enriched.