org.axonframework.commandhandling.distributed.jgroups.support.callbacks
Class ReplyingCallback
java.lang.Object
org.axonframework.commandhandling.distributed.jgroups.support.callbacks.ReplyingCallback
- All Implemented Interfaces:
- org.axonframework.commandhandling.CommandCallback<Object>
public class ReplyingCallback
- extends Object
- implements org.axonframework.commandhandling.CommandCallback<Object>
Callback implementation that forwards the callback invocation as a reply to an incoming message.
- Since:
- 2.0
- Author:
- Allard Buijze
|
Constructor Summary |
ReplyingCallback(org.jgroups.JChannel channel,
org.jgroups.Address address,
org.axonframework.commandhandling.CommandMessage commandMessage,
org.axonframework.serializer.Serializer serializer)
Initialize the callback to send a reply for an incoming commandMessage to given address using the given channel. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReplyingCallback
public ReplyingCallback(org.jgroups.JChannel channel,
org.jgroups.Address address,
org.axonframework.commandhandling.CommandMessage commandMessage,
org.axonframework.serializer.Serializer serializer)
- Initialize the callback to send a reply for an incoming
commandMessage to given address using the given channel.
The given serializer is used to serialize the reply message.
- Parameters:
channel - The channel to send the reply onaddress - The destination for the reply messagecommandMessage - The incoming command messageserializer - The serializer to serialize the reply with
onSuccess
public void onSuccess(Object result)
- Specified by:
onSuccess in interface org.axonframework.commandhandling.CommandCallback<Object>
onFailure
public void onFailure(Throwable cause)
- Specified by:
onFailure in interface org.axonframework.commandhandling.CommandCallback<Object>
Copyright © 2010-2016. All Rights Reserved.