KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > tribe > gms > GroupMembershipListener


1 /**
2  * Tribe: Group communication library.
3  * Copyright (C) 2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Contact: tribe@objectweb.org
6  *
7  * This library is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as published by the
9  * Free Software Foundation; either version 2.1 of the License, or any later
10  * version.
11  *
12  * This library is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
15  * for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this library; if not, write to the Free Software Foundation,
19  * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
20  *
21  * Initial developer(s): Emmanuel Cecchet.
22  * Contributor(s): ______________________.
23  */

24
25 package org.objectweb.tribe.gms;
26
27 import org.objectweb.tribe.common.Address;
28 import org.objectweb.tribe.common.Group;
29 import org.objectweb.tribe.common.GroupIdentifier;
30 import org.objectweb.tribe.common.Member;
31
32 /**
33  * This interface defines a GroupMembershipListener
34  *
35  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
36  * @version 1.0
37  */

38 public interface GroupMembershipListener
39 {
40
41   /**
42    * Callback when a new member joins a group.
43    *
44    * @param m the new member.
45    * @param gid the group identifier
46    */

47   void joinMember(Member m, GroupIdentifier gid);
48
49   /**
50    * Callback when a member leaves a group (intentionally or not).
51    *
52    * @param m the member who left the group.
53    * @param gid the group identifier
54    */

55   void quitMember(Member m, GroupIdentifier gid);
56
57   /**
58    * Callback when a member sends its view of a group composition.
59    *
60    * @param g the group composition
61    * @param sender the member sending the group information
62    */

63   void groupComposition(Group g, Address sender);
64
65   /**
66    * Callback when a group member is suspected of failure.
67    *
68    * @param failed the member suspected of failure
69    * @param gid group identifier
70    * @param sender message sender (reporting the failure)
71    */

72   void failedMember(Member failed, GroupIdentifier gid, Member sender);
73
74 }
Popular Tags