org.axonframework.commandhandling
Interface CommandCallback<R>

Type Parameters:
R - the type of result of the command handling
All Known Implementing Classes:
BlacklistDetectingCallback, FutureCallback, LoggingCallback, MemberAwareCommandCallback, NoOpCallback, ReplyingCallback, ResultValidatorImpl, RetryingCallback, VoidCallback

public interface CommandCallback<R>

Interface describing a callback that is invoked when command handler execution has finished. Depending of the outcome of the execution, either the onSuccess(Object) or the onFailure(Throwable) is called.

Since:
0.6
Author:
Allard Buijze

Method Summary
 void onFailure(Throwable cause)
          Invoked when command handling execution resulted in an error.
 void onSuccess(R result)
          Invoked when command handling execution was successful.
 

Method Detail

onSuccess

void onSuccess(R result)
Invoked when command handling execution was successful.

Parameters:
result - The result of the command handling execution, if any.

onFailure

void onFailure(Throwable cause)
Invoked when command handling execution resulted in an error.

Parameters:
cause - The exception raised during command handling


Copyright © 2010-2016. All Rights Reserved.