org.axonframework.commandhandling.callbacks
Class NoOpCallback

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

public final class NoOpCallback
extends Object
implements CommandCallback<Object>

Callback that does absolutely nothing when invoked. For performance reasons, an instance of this callback can be obtained using NoOpCallback.INSTANCE. A generics-compatible alternative is provided by NoOpCallback.<C>instance().

Since:
0.6
Author:
Allard Buijze

Field Summary
static NoOpCallback INSTANCE
          A statically available instance of the NoOpCallback.
 
Constructor Summary
NoOpCallback()
           
 
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
 

Field Detail

INSTANCE

public static final NoOpCallback INSTANCE
A statically available instance of the NoOpCallback. Provided for performance reasons.

Constructor Detail

NoOpCallback

public NoOpCallback()
Method Detail

onSuccess

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

This implementation does nothing.

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

onFailure

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

This implementation does nothing.

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


Copyright © 2010-2016. All Rights Reserved.