Builder

public class Builder extends BusBuilder<B, T, E, C, D>

The Builder for EventBus.

Functions

Link copied to clipboard
public EventBus build()
Builds an instance of EventBus.
Link copied to clipboard
Obtains Enricher assigned to the bus to be built.
Link copied to clipboard
public void injectEnricher(EventEnricher enricher)
Sets a custom Enricher for events posted to the EventBus which is being built.
Link copied to clipboard
public Optional<StreamObserver<Ack>> observer()
Obtains StreamObserver assigned to the bus.
Link copied to clipboard
protected EventBus.Builder self()
Returns this reference to avoid redundant casts.
Link copied to clipboard
public EventBus.Builder setObserver(StreamObserver<Ack> observer)
Assigns the observer for the post operations.

Inherited functions

Link copied to clipboard
public final B addListener(Listener<E> listener)
Adds a listener of the message posted to the bus being build.
Link copied to clipboard
public final B appendFilter(BusFilter<E> filter)
Adds the given filter to the builder.
Link copied to clipboard
protected void checkFieldsSet()
Link copied to clipboard
protected final BoundedContext context()
Link copied to clipboard
public final Iterable<BusFilter<E>> filters()
Obtains the filters added to this this builder by the time of the call.
Link copied to clipboard
public B injectContext(BoundedContext context)
Link copied to clipboard
public B injectSystem(SystemWriteSide writeSide)
Inject the SystemWriteSide of the Bounded Context to which the built bus belongs.
Link copied to clipboard
Inject the TenantIndex of the Bounded Context to which the built bus belongs.
Link copied to clipboard
public final Set<Listener<E>> listeners()
Obtains immutable set of listeners added to the builder by the time of the call.
Link copied to clipboard
public final B removeListener(Listener<E> listener)
Removes the listener.
Link copied to clipboard
Obtains a SystemWriteSide set in the builder.
Link copied to clipboard
Obtains a TenantIndex set in the builder.