public abstract class AbstractEventReactor extends java.lang.Object implements EventReactor, EventDispatcher
Events may be produced in response to both domestic and external events.
To use one, do the following:
reactors
Constructor and Description |
---|
AbstractEventReactor() |
Modifier and Type | Method and Description |
---|---|
void |
dispatch(EventEnvelope event)
Dispatches the message contained in the passed envelope.
|
com.google.common.collect.ImmutableSet<EventClass> |
domesticEventClasses()
Obtains classes of domestic events processed by this dispatcher.
|
com.google.common.collect.ImmutableSet<EventClass> |
externalEventClasses()
Obtains classes of external events processed by this dispatcher.
|
boolean |
isRegistered() |
com.google.common.collect.ImmutableSet<EventClass> |
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.
|
com.google.protobuf.Any |
producerId()
Obtains the name of this reactor, packed to Any.
|
void |
registerWith(BoundedContext context) |
io.spine.core.Version |
version()
Returns a zero version.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
nothing
dispatchesEvents, dispatchesExternalEvents, eventClasses
canDispatch
public void registerWith(BoundedContext context)
public boolean isRegistered()
public com.google.common.collect.ImmutableSet<EventClass> messageClasses()
MessageDispatcher
messageClasses
in interface MessageDispatcher<EventClass,EventEnvelope>
public void dispatch(EventEnvelope event)
MessageDispatcher
dispatch
in interface MessageDispatcher<EventClass,EventEnvelope>
event
- the envelope with the messagepublic com.google.protobuf.Any producerId()
producerId
in interface EventProducer
public io.spine.core.Version version()
version
in interface EventProducer
public com.google.common.collect.ImmutableSet<EventClass> externalEventClasses()
EventDispatcher
externalEventClasses
in interface EventDispatcher
public com.google.common.collect.ImmutableSet<EventClass> domesticEventClasses()
EventDispatcher
domesticEventClasses
in interface EventDispatcher
public com.google.common.collect.ImmutableSet<EventClass> producedEvents()
EventProducer
producedEvents
in interface EventProducer