TraceEventObserver

public final class TraceEventObserver extends AbstractEventSubscriber

An event subscriber which listens to dispatching events.

Constructors

Link copied to clipboard
public void TraceEventObserver(ContextSpec context, TracerFactory tracing)

Inherited functions

Link copied to clipboard
public boolean canDispatch(E envelope)
public boolean canDispatch(EventEnvelope event)
Checks if this dispatcher can dispatch the given message.
Link copied to clipboard
public void checkNotRegistered()
Verifies that this instance is NOT registered yet.
Link copied to clipboard
public void checkRegistered()
Verifies that this instance is already registered.
Link copied to clipboard
public abstract DispatchOutcome dispatch(E envelope)
Dispatches the message contained in the passed envelope and returns the outcome.
public final DispatchOutcome dispatch(EventEnvelope event)
Dispatches the event to the handling method.
Link copied to clipboard
public boolean dispatchesEvents()
Verifies if this instance dispatches at least one event.
Link copied to clipboard
public boolean dispatchesExternalEvents()
Verifies if this instance dispatches at least one external event.
Link copied to clipboard
public ImmutableSet<EventClass> domesticEventClasses()
Obtains classes of domestic events processed by this dispatcher.
Link copied to clipboard
public ImmutableSet<EventClass> eventClasses()
Obtains classes of all events processed by this dispatcher.
Link copied to clipboard
public ImmutableSet<EventClass> externalEventClasses()
Obtains classes of external events processed by this dispatcher.
Link copied to clipboard
protected DispatchOutcome handle(EventEnvelope event)
Handles an event dispatched to this subscriber instance.
Link copied to clipboard
public boolean isRegistered()
Determines if this instance is already registered with a Bounded Context.
Link copied to clipboard
public abstract ImmutableSet<C> messageClasses()
public ImmutableSet<EventClass> messageClasses()
Obtains a set of message classes that can be processed by this dispatcher.
Link copied to clipboard
public void registerWith(BoundedContext context)
Registers this instance as a part of the given Bounded Context.