|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.MultiplexingEventProcessingMonitor
public class MultiplexingEventProcessingMonitor
Implementation of the EventProcessingMonitor that receives multiple invocations of downstream monitors and translates that to a single invocation to a target monitor.
This allows for multiple asynchronous executions to be reported in a single invocation to a monitor. Only when all downstream monitors report successful event handling, it will be reported as successful to the target monitor. When a failure is reported, it is reported to the target monitor as a failure as soon as all expected reports have been received.
| Constructor Summary | |
|---|---|
MultiplexingEventProcessingMonitor(EventProcessingMonitor targetMonitor)
Creates an instance with the given targetMonitor as the monitor to eventually forward calls to. |
|
| Method Summary | |
|---|---|
void |
onEventProcessingCompleted(List<? extends EventMessage> eventMessages)
Invoked when one or more events have been successfully processed by the instance it was subscribed to. |
void |
onEventProcessingFailed(List<? extends EventMessage> eventMessages,
Throwable cause)
Invoked when one or more events have failed processing by the instance it was subscribed to. |
void |
prepare(EventMessage eventMessage)
Prepare the monitor for processing the given message. |
void |
prepareForInvocation(EventMessage eventMessage,
EventListener member)
Prepare the monitor for the invocation of the given message to the given member. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MultiplexingEventProcessingMonitor(EventProcessingMonitor targetMonitor)
targetMonitor as the monitor to eventually forward calls to.
targetMonitor - The monitor to eventually forward calls to| Method Detail |
|---|
public void prepare(EventMessage eventMessage)
message. This means a tracker will be created to this
event, which keeps track of the required and actual invocations.
When an unprepared message is acknowledged or reported as failed, that notification is immediately forwarded to
the target monitor.
eventMessage - The event message to prepare for.
public void prepareForInvocation(EventMessage eventMessage,
EventListener member)
message to the given member. This
means that, if the given member implement EventProcessingMonitorSupport,
the monitor will wait for an invocation by that member's monitor.
It is important that this invocation happens before the actual invocation of the member.
eventMessage - The message about to be sentmember - The member that will be invoked
IllegalArgumentException - if the given eventMessage has not been prepared yet.public void onEventProcessingCompleted(List<? extends EventMessage> eventMessages)
EventProcessingMonitor
onEventProcessingCompleted in interface EventProcessingMonitoreventMessages - The messages that have been successfully processed
public void onEventProcessingFailed(List<? extends EventMessage> eventMessages,
Throwable cause)
EventProcessingMonitor
onEventProcessingFailed in interface EventProcessingMonitoreventMessages - The message that failedcause - The cause of the failure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||