Interface EventProcessor
- All Superinterfaces:
DescribableComponent
- All Known Subinterfaces:
StreamingEventProcessor
- All Known Implementing Classes:
PooledStreamingEventProcessor,SubscribingEventProcessor
An Event Processor processes event messages from an event queue or event bus.
Typically, an Event Processor is in charge of publishing the events to a group of registered handlers. This allows
attributes and behavior (e.g. transaction management, asynchronous processing, distribution) to be applied over
a whole group at once.
- Since:
- 1.2.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisError()Indicates whether the processor has been shut down due to an error.booleanIndicates whether this processor is currently running (i.e. consuming events from its message source).name()Returns the name of this event processor.shutdown()Initiates a shutdown, providing aCompletableFuturethat completes when the shutdown process is finished.start()Initiates a start, providing aCompletableFuturethat completes when the start process is finished.Methods inherited from interface org.axonframework.common.infra.DescribableComponent
describeTo
-
Method Details
-
name
String name()Returns the name of this event processor. This name is used to detect distributed instances of the same event processor. Multiple instances referring to the same logical event processor (on different JVM's) must have the same name.- Returns:
- the name of this event processor
-
start
CompletableFuture<Void> start()Initiates a start, providing aCompletableFuturethat completes when the start process is finished.- Returns:
- a CompletableFuture that completes when the start process is finished.
-
isRunning
boolean isRunning()Indicates whether this processor is currently running (i.e. consuming events from its message source).- Returns:
truewhen running, otherwisefalse
-
isError
boolean isError()Indicates whether the processor has been shut down due to an error. In such case, the processor has forcefully shut down, as it wasn't able to automatically recover.Note that this method returns
falsewhen the processor was stopped usingshutdown().- Returns:
truewhen paused due to an error, otherwisefalse
-
shutdown
CompletableFuture<Void> shutdown()Initiates a shutdown, providing aCompletableFuturethat completes when the shutdown process is finished.- Returns:
- a CompletableFuture that completes when the shutdown process is finished.
-