|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.async.EventProcessor
public class EventProcessor
Scheduler that keeps track of (Event processing) tasks that need to be executed sequentially.
| Nested Class Summary | |
|---|---|
protected static class |
EventProcessor.ProcessingResult
Class indicating the result of Event Processing and the policy for resuming or retrying in case of errors. |
static interface |
EventProcessor.ShutdownCallback
Callback that allows the SequenceManager to receive a notification when this scheduler finishes processing events. |
| Constructor Summary | |
|---|---|
EventProcessor(Executor executor,
EventProcessor.ShutdownCallback shutDownCallback,
ErrorHandler errorHandler,
UnitOfWorkFactory unitOfWorkFactory,
Set<EventListener> eventListeners,
MultiplexingEventProcessingMonitor eventProcessingMonitor)
Initialize a scheduler using the given executor. |
|
| Method Summary | |
|---|---|
protected EventProcessor.ProcessingResult |
doHandle(EventMessage<?> event)
Does the actual processing of the event. |
void |
run()
|
boolean |
scheduleEvent(EventMessage<?> event)
Schedules an event for processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventProcessor(Executor executor,
EventProcessor.ShutdownCallback shutDownCallback,
ErrorHandler errorHandler,
UnitOfWorkFactory unitOfWorkFactory,
Set<EventListener> eventListeners,
MultiplexingEventProcessingMonitor eventProcessingMonitor)
executor. This scheduler uses an unbounded queue to schedule
events.
executor - The executor service that will process the eventsshutDownCallback - The callback to notify when the scheduler finishes processing eventserrorHandler - The error handler to invoke when an error occurs while committing a Unit of WorkunitOfWorkFactory - The factory providing instances of the Unit of WorkeventListeners - The event listeners that should handle incoming eventseventProcessingMonitor - The listener to notify when processing completed| Method Detail |
|---|
public boolean scheduleEvent(EventMessage<?> event)
event - the event to schedule
IllegalStateException - if the queue in this scheduler does not have the capacity to add this eventpublic void run()
run in interface Runnableprotected EventProcessor.ProcessingResult doHandle(EventMessage<?> event)
event - The event to handle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||