BusBuilder

public abstract class BusBuilder<B extends BusBuilder<B, T, E, C, D>, T extends Signal<?, ?, ?>, E extends SignalEnvelope<? extends Object, T, ? extends Object>, C extends MessageClass<? extends Message>, D extends MessageDispatcher<C, E>>

The implementation base for the bus builders.

Parameters

<E>

the type of SignalEnvelope posted by the bus

<T>

the type of Signal posted by the bus

<B>

the own type of the builder

Inheritors

Constructors

Link copied to clipboard
protected void BusBuilder()
Creates a new instance of the bus builder.

Types

Link copied to clipboard
public final class FieldCheck
Verifies if required fields of a BusBuilder are set.

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
public abstract Bus<? extends Object, E, ? extends Object, ? extends Object> build()
Creates new instance of Bus with the set parameters.
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
protected abstract DispatcherRegistry<C, E, D> newRegistry()
Link copied to clipboard
public final B removeListener(Listener<E> listener)
Removes the listener.
Link copied to clipboard
protected abstract B self()
Returns this reference to avoid redundant casts.
Link copied to clipboard
Obtains a SystemWriteSide set in the builder.
Link copied to clipboard
Obtains a TenantIndex set in the builder.