org.axonframework.commandhandling.distributed.jgroups.support.callbacks
Class ReplyingCallback

java.lang.Object
  extended by 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.
 
Method Summary
 void onFailure(Throwable cause)
           
 void onSuccess(Object result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 on
address - The destination for the reply message
commandMessage - The incoming command message
serializer - The serializer to serialize the reply with
Method Detail

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.