Class MonitorAwareCallback<C,R>
java.lang.Object
org.axonframework.commandhandling.MonitorAwareCallback<C,R>
- Type Parameters:
C- the type of payload of the commandR- the type of result of the command handling
- All Implemented Interfaces:
CommandCallback<C,R>
Wrapper for a callback that notifies a Message Monitor of the message execution result.
-
Constructor Summary
ConstructorsConstructorDescriptionMonitorAwareCallback(CommandCallback<C, R> delegate, MessageMonitor.MonitorCallback messageMonitorCallback) Initialize a callback wrapped around thedelegatewhich will notify a Message Monitor for the givenmessageMonitorCallback. -
Method Summary
Modifier and TypeMethodDescriptionvoidonResult(CommandMessage<? extends C> commandMessage, CommandResultMessage<? extends R> commandResultMessage) Invoked when command handling execution is completed.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.commandhandling.CommandCallback
wrap
-
Constructor Details
-
MonitorAwareCallback
public MonitorAwareCallback(@Nullable CommandCallback<C, R> delegate, @Nonnull MessageMonitor.MonitorCallback messageMonitorCallback) Initialize a callback wrapped around thedelegatewhich will notify a Message Monitor for the givenmessageMonitorCallback.- Parameters:
delegate- the CommandCallback which is being wrapped, may benullmessageMonitorCallback- the callback for the Message Monitor
-
-
Method Details
-
onResult
public void onResult(@Nonnull CommandMessage<? extends C> commandMessage, @Nonnull CommandResultMessage<? extends R> commandResultMessage) Description copied from interface:CommandCallbackInvoked when command handling execution is completed.- Specified by:
onResultin interfaceCommandCallback<C,R> - Parameters:
commandMessage- theCommandMessagethat was dispatchedcommandResultMessage- theCommandResultMessageof the command handling execution
-