org.axonframework.test.utils
Class DefaultCallbackBehavior

java.lang.Object
  extended by 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.onSuccess(Object) method to be invoked with a null result parameter.

Since:
2.0
Author:
Allard Buijze

Constructor Summary
DefaultCallbackBehavior()
           
 
Method Summary
 Object handle(Object commandPayload, MetaData commandMetaData)
          Invoked when the Command Bus receives a Command that is dispatched with a Callback method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCallbackBehavior

public DefaultCallbackBehavior()
Method Detail

handle

public Object handle(Object commandPayload,
                     MetaData commandMetaData)
              throws Throwable
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 onSuccess method.
Throws:
Throwable - If the onFailure method of the callback must be invoked


Copyright © 2010-2016. All Rights Reserved.