R
- the type of result of the command handlingC
- the type of payload of the commandpublic class WrappedCommandCallback<C,R> extends Object implements CommandCallback<C,R>
CommandCallback
that was wrapped with another. When the WrappedCommandCallback
is
called, it will first execute the outer callback, then execute the inner callback.
You can wrap a CommandCallback
with another using CommandCallback.wrap(CommandCallback)
.Modifier | Constructor and Description |
---|---|
protected |
WrappedCommandCallback(CommandCallback<C,R> outerCallback,
CommandCallback<C,R> innerCallback)
Constructs a new
WrappedCommandCallback , called by using CommandCallback.wrap(CommandCallback) . |
Modifier and Type | Method and Description |
---|---|
void |
onResult(CommandMessage<? extends C> commandMessage,
CommandResultMessage<? extends R> commandResultMessage)
Invoked when command handling execution is completed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
wrap
protected WrappedCommandCallback(CommandCallback<C,R> outerCallback, CommandCallback<C,R> innerCallback)
WrappedCommandCallback
, called by using CommandCallback.wrap(CommandCallback)
.outerCallback
- The outer callback. This callback will be executed first.innerCallback
- The inner callback.public void onResult(@Nonnull CommandMessage<? extends C> commandMessage, @Nonnull CommandResultMessage<? extends R> commandResultMessage)
CommandCallback
onResult
in interface CommandCallback<C,R>
commandMessage
- the CommandMessage
that was dispatchedcommandResultMessage
- the CommandResultMessage
of the command handling executionCopyright © 2010–2024. All rights reserved.