Class DefaultCallbackBehavior

java.lang.Object
org.axonframework.test.utils.DefaultCallbackBehavior
All Implemented Interfaces:
CallbackBehavior

public class DefaultCallbackBehavior extends Object implements CallbackBehavior
Default implementation of the CallbackBehavior interface. This implementation always returns null, which results in the CommandCallback.onResult(org.axonframework.commandhandling.CommandMessage, CommandResultMessage) method to be invoked with a null result parameter.
Since:
2.0
Author:
Allard Buijze
  • Constructor Details

    • DefaultCallbackBehavior

      public DefaultCallbackBehavior()
  • Method Details

    • handle

      public Object handle(Object commandPayload, MetaData commandMetaData)
      Description copied from interface: CallbackBehavior
      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.
      Specified by:
      handle in interface CallbackBehavior
      Parameters:
      commandPayload - The payload of the Command Message
      commandMetaData - The MetaData of the CommandMessage
      Returns:
      any return value to pass to the callback's onResult method.