AbstractMessageEndpoint

public abstract class AbstractMessageEndpoint<I, M extends SignalEnvelope<? extends Object, ? extends Object, ? extends Object>> implements MessageEndpoint<I, M>

An abstract base for messages endpoints.

Upon a run-time dispatching, catches all Exceptions throw, and transforms them into a DispatchOutcome.

Parameters

<I>

the type of target identifier

<M>

the type of message envelope being delivered

Inheritors

Constructors

Link copied to clipboard
protected void AbstractMessageEndpoint(M envelope)

Functions

Link copied to clipboard
public final DispatchOutcome dispatchTo(I targetId)
Dispatches the message to the target with the passed ID.
Link copied to clipboard
protected final M envelope()
Obtains the envelope of the message processed by this endpoint.
Link copied to clipboard
protected abstract DispatchOutcome performDispatch(I targetId)
Performs actual dispatching of the signal to the respective target by the passed ID.

Inherited functions

Link copied to clipboard
public abstract void onDuplicate(I target, M envelope)
The callback invoked if the handled signal is a duplicate.
Link copied to clipboard
public abstract Repository<I, ? extends Object> repository()
Obtains the repository which manages the target entities.