jgroup.multicast
Interface AckListener


public interface AckListener

This interface enables members to receive ack messages in response to multicasts. When a message is delivered, upcall methods deliverStream and deliverObject of interface MulticastListener are invoked. MulticastListener objects may respond to these invocations by returning an object, that will be delivered to the multicast sender through the AckListener interface.

Since:
Jgroup 0.8
Author:
Alberto Montresor

Method Summary
 void ack(MemberId id, int pos, java.lang.Object obj)
          Upcalls invoked by Jgroup to notify the ack listener that the member identified by id has responded with obj to the multicast message associated with this ack listener.
 void notifyView(View view)
          Upcalls invoked by Jgroup to notify the ack listener about the view in which the multicast message is delivered.
 void viewChange()
          Upcalls invoked by Jgroup to notify the ack listener that a new view has been installed after the view in which the message has been delivered.
 

Method Detail

notifyView

public void notifyView(View view)
Upcalls invoked by Jgroup to notify the ack listener about the view in which the multicast message is delivered. Note that following the Jgroup specification, a message may be delivered in a view different from the one in which the message has been multicast; this is motivated by the fact that during agreement protocols, no new messages can be delivered; in fact, cascading sequences of delivered messages could prevent the completion of agreement protocols.
Parameters:
view - the view in which the multicast message is delivered

ack

public void ack(MemberId id,
                int pos,
                java.lang.Object obj)
Upcalls invoked by Jgroup to notify the ack listener that the member identified by id has responded with obj to the multicast message associated with this ack listener.

Member id is contained in the view notified by notifyView.

Parameters:
id - the identifier of the member responding to the multicast message
pos - position of the member in the last installed view
obj - the response message

viewChange

public void viewChange()
Upcalls invoked by Jgroup to notify the ack listener that a new view has been installed after the view in which the message has been delivered. After this event, no missing response messages for the multicast message associated to this ack listener will ever be received.