public abstract class AbstractCommandDispatcher extends java.lang.Object implements CommandDispatcher
EventBus
.Constructor and Description |
---|
AbstractCommandDispatcher() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Indicates whether some other command handler is "equal to" this one.
|
int |
hashCode() |
java.lang.String |
id()
Obtains identity string of the dispatcher.
|
boolean |
isRegistered() |
protected void |
onError(SignalEnvelope<?,?,?> signal,
io.spine.base.Error error) |
protected void |
onRejection(SignalEnvelope<?,?,?> signal,
io.spine.core.Event rejection) |
protected void |
postEvents(java.lang.Iterable<io.spine.core.Event> events)
Posts passed events to
EventBus . |
com.google.protobuf.Any |
producerId()
Obtains ID packed into
Any for being used in generated events. |
void |
registerWith(BoundedContext context) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
dispatchesCommands
canDispatch, dispatch, messageClasses
public void registerWith(BoundedContext context)
public boolean isRegistered()
public java.lang.String id()
Default implementation returns fully-qualified name of the class.
public com.google.protobuf.Any producerId()
Any
for being used in generated events.protected void postEvents(java.lang.Iterable<io.spine.core.Event> events)
EventBus
.protected void onError(SignalEnvelope<?,?,?> signal, io.spine.base.Error error)
protected void onRejection(SignalEnvelope<?,?,?> signal, io.spine.core.Event rejection)
public boolean equals(java.lang.Object o)
Two command handlers are equal if they handle the same set of commands.
equals
in class java.lang.Object
CommandHandler
handles the same set of command classesMessageDispatcher.messageClasses()
public int hashCode()
hashCode
in class java.lang.Object