Package org.axonframework.test.util
Interface CallbackBehavior
- All Known Implementing Classes:
DefaultCallbackBehavior
public interface CallbackBehavior
Interface towards a mechanism that replicates the behavior of a Command Handling component. The goal of this
component is to mimic behavior on the callback.
- Since:
- 2.0
- Author:
- Allard Buijze
-
Method Summary
-
Method Details
-
handle
Invoked when the Command Bus receives a Command that is dispatched with a Callback method. The return value of this invocation is used to invoke the callback.- Parameters:
commandPayload- The payload of the Command MessagecommandMetadata- The Metadata of the CommandMessage- Returns:
- any return value to pass to the callback's onResult method.
- Throws:
Exception- If the onFailure method of the callback must be invoked
-