org.objectweb.tribe.channel
Class ReliableGroupChannelWithGms

java.lang.Object
  extended byorg.objectweb.tribe.channel.ReliableGroupChannel
      extended byorg.objectweb.tribe.channel.ReliableGroupChannelWithGms
Direct Known Subclasses:
JGroupsReliableChannelWithGms, ReliableGroupChannelWithViews

public class ReliableGroupChannelWithGms
extends ReliableGroupChannel

This class defines a ReliableGroupChannel relying on a Group Membership Service (GMS).

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
protected  GroupMembershipService gms
           
 
Fields inherited from class org.objectweb.tribe.channel.ReliableGroupChannel
channelPool, currentGroup, incomingBuffer, me
 
Constructor Summary
ReliableGroupChannelWithGms(GroupMembershipService gms)
          Creates a new ReliableGroupChannelWithGms using the provided group membership service.
 
Method Summary
 Group getGroup(GroupIdentifier gid)
          Get the group (including its members) corresponding to the given gid.
 void join(GroupIdentifier gid)
          Join the group that has the given group identifier.
 void quit()
          Quit the current group.
 java.util.ArrayList send(java.io.Serializable msg, GroupIdentifier gid, java.util.ArrayList members)
          Sends a message to members of group gid without being necessary member of the group.
 
Methods inherited from class org.objectweb.tribe.channel.ReliableGroupChannel
close, getCurrentGroup, getLocalMembership, join, receive, send, send, setMembership
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gms

protected GroupMembershipService gms
Constructor Detail

ReliableGroupChannelWithGms

public ReliableGroupChannelWithGms(GroupMembershipService gms)
Creates a new ReliableGroupChannelWithGms using the provided group membership service.

Parameters:
gms - the GMS service to use
Method Detail

join

public void join(GroupIdentifier gid)
          throws AlreadyMemberException,
                 ChannelException,
                 NotConnectedException
Join the group that has the given group identifier.

Parameters:
gid - the identifier of the group to join
Throws:
AlreadyMemberException - if we are already member of the group
NotConnectedException - if the channel is not connected
ChannelException - if an error is reported by the channel

quit

public void quit()
          throws ChannelException,
                 NotConnectedException
Quit the current group.

Overrides:
quit in class ReliableGroupChannel
Throws:
ChannelException - if a communication error occurs
NotConnectedException - if the channel is not connected to any group

getGroup

public Group getGroup(GroupIdentifier gid)
Get the group (including its members) corresponding to the given gid. If the GMS was never asked to join the given group, then null is returned.

Parameters:
gid - the group identifier
Returns:
the Group corresponding to this gid.

send

public java.util.ArrayList send(java.io.Serializable msg,
                                GroupIdentifier gid,
                                java.util.ArrayList members)
                         throws ChannelException,
                                NotConnectedException
Sends a message to members of group gid without being necessary member of the group.

Overrides:
send in class ReliableGroupChannel
Parameters:
msg - message to send
members - ArrayList of Member that are all part of the group
Returns:
an ArrayList of Members who failed, or null if all members received successfully the message.
Throws:
ChannelException - if an error occurs
NotConnectedException - if the channel is not connected to any group


Copyright © 2004 - ObjectWeb Consortium - All Rights Reserved.