DispatcherRegistry

public abstract class DispatcherRegistry<C extends MessageClass<? extends Message>, E extends MessageEnvelope<? extends Object, ? extends Object, ? extends Object>, D extends MessageDispatcher<C, E>>

A registry of message dispatchers.

Parameters

<C>

the type of the class of dispatched messages

<D>

the type of the message dispatchers

Constructors

Link copied to clipboard
public void DispatcherRegistry()

Functions

Link copied to clipboard
Returns a filter allowing to tell whether the attributes of the envelope match the dispatcher requirements.
Link copied to clipboard
protected void checkDispatcher(D dispatcher)
Ensures that the passed dispatcher is valid.
Link copied to clipboard
protected Optional<D> dispatcherOf(E envelope)
Obtains a single dispatcher (if available) for the passed message.
Link copied to clipboard
protected Set<D> dispatchersOf(C messageClass)
Obtains all the dispatchers for the passed message class.
Link copied to clipboard
protected Optional<? extends D> getDispatcherForType(C messageClass)
Obtains a single dispatcher (if available) for the passed message.
Link copied to clipboard
public void register(D dispatcher)
Link copied to clipboard
Obtains message classes from all registered dispatchers.
Link copied to clipboard
public void unregister(D dispatcher)
Link copied to clipboard
protected void unregisterAll()
Unregisters all dispatchers.