org.axonframework.commandhandling.callbacks
Class LoggingCallback

java.lang.Object
  extended by org.axonframework.commandhandling.callbacks.LoggingCallback
All Implemented Interfaces:
CommandCallback<Object>

public class LoggingCallback
extends Object
implements CommandCallback<Object>

CommandCallback implementation that simply logs the results of a command.

Since:
2.0
Author:
Allard Buijze

Constructor Summary
LoggingCallback(CommandMessage<?> message)
          Initialize a LoggingCallback for the given message.
 
Method Summary
 void onFailure(Throwable cause)
          Invoked when command handling execution resulted in an error.
 void onSuccess(Object result)
          Invoked when command handling execution was successful.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingCallback

public LoggingCallback(CommandMessage<?> message)
Initialize a LoggingCallback for the given message.

Parameters:
message - The message for which the results are to be logged.
Method Detail

onSuccess

public void onSuccess(Object result)
Description copied from interface: CommandCallback
Invoked when command handling execution was successful.

Specified by:
onSuccess in interface CommandCallback<Object>
Parameters:
result - The result of the command handling execution, if any.

onFailure

public void onFailure(Throwable cause)
Description copied from interface: CommandCallback
Invoked when command handling execution resulted in an error.

Specified by:
onFailure in interface CommandCallback<Object>
Parameters:
cause - The exception raised during command handling


Copyright © 2010-2016. All Rights Reserved.