public abstract class AbstractCommander extends AbstractCommandDispatcher implements Commander
Constructor and Description |
---|
AbstractCommander() |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(CommandEnvelope command)
Dispatches the message contained in the passed envelope.
|
void |
dispatchEvent(EventEnvelope event) |
com.google.common.collect.ImmutableSet<EventClass> |
domesticEvents() |
com.google.common.collect.ImmutableSet<EventClass> |
events() |
com.google.common.collect.ImmutableSet<EventClass> |
externalEvents() |
com.google.common.collect.ImmutableSet<CommandClass> |
messageClasses()
Obtains a set of message classes that can be processed by this dispatcher.
|
com.google.common.collect.ImmutableSet<EventClass> |
producedEvents()
Obtains classes of the events produced by this object.
|
void |
registerWith(BoundedContext context) |
io.spine.core.Version |
version()
The version of the object to be put into events.
|
equals, hashCode, id, isRegistered, onError, onRejection, postEvents, producerId
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
nothing, producerId
dispatchesCommands
canDispatch
public void registerWith(BoundedContext context)
registerWith
in class AbstractCommandDispatcher
public com.google.common.collect.ImmutableSet<CommandClass> messageClasses()
MessageDispatcher
messageClasses
in interface MessageDispatcher<CommandClass,CommandEnvelope>
@CanIgnoreReturnValue public void dispatch(CommandEnvelope command)
MessageDispatcher
dispatch
in interface MessageDispatcher<CommandClass,CommandEnvelope>
command
- the envelope with the messagepublic com.google.common.collect.ImmutableSet<EventClass> events()
public com.google.common.collect.ImmutableSet<EventClass> externalEvents()
public com.google.common.collect.ImmutableSet<EventClass> domesticEvents()
public void dispatchEvent(EventEnvelope event)
public io.spine.core.Version version()
If empty, no version will be added to the generated events.
Always returns a version with number 0
and current time.
version
in interface EventProducer
public com.google.common.collect.ImmutableSet<EventClass> producedEvents()
Always returns an empty set.
producedEvents
in interface EventProducer