R- the type of result of the command handling
C- the type of payload of the command
@FunctionalInterface public interface CommandCallback<C,R>
|Modifier and Type||Method and Description|
Invoked when command handling execution is completed.
Wraps the command callback with another using a
void onResult(@Nonnull CommandMessage<? extends C> commandMessage, @Nonnull CommandResultMessage<? extends R> commandResultMessage)
default CommandCallback<C,R> wrap(CommandCallback<C,R> wrappingCallback)
WrappedCommandCallback. If provided with a null callback this method will not wrap it, keeping the original callback instead.
In effect, the given callback will be executed first, and then the original will be executed second. You can wrap callback as many times as you'd like.
wrappingCallback- The command callback that should wrap the current instance
WrappedCommandCallbackrepresenting the execution of both callbacks
Copyright © 2010–2023. All rights reserved.