org.axonframework.test.utils
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
 Object handle(Object commandPayload, MetaData commandMetaData)
          Invoked when the Command Bus receives a Command that is dispatched with a Callback method.
 

Method Detail

handle

Object handle(Object commandPayload,
              MetaData commandMetaData)
              throws Throwable
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 Message
commandMetaData - The MetaData of the CommandMessage
Returns:
any return value to pass to the callback's onSuccess method.
Throws:
Throwable - If the onFailure method of the callback must be invoked


Copyright © 2010-2016. All Rights Reserved.