org.objectweb.tribe.channel
Class JGroupsReliableChannel

java.lang.Object
  extended byorg.objectweb.tribe.channel.ReliableGroupChannel
      extended byorg.objectweb.tribe.channel.JGroupsReliableChannel

public class JGroupsReliableChannel
extends ReliableGroupChannel

This class defines a JGroupsReliableChannel which is a ReliableGroupChannel wrapper on top of a JGroups JChannel.

Version:
1.0
Author:
Emmanuel Cecchet

Field Summary
 
Fields inherited from class org.objectweb.tribe.channel.ReliableGroupChannel
channelPool, currentGroup, incomingBuffer, me
 
Constructor Summary
JGroupsReliableChannel(java.net.URL jgroupsConfigFile)
          Creates a new JGroupsReliableChannel object
 
Method Summary
 java.lang.String getProperties()
          Return the JGroups channel properties
 void join(Group g)
          Join the group that has the given group identifier.
 void quit()
          Quit the current group without closing the channel.
 java.io.Serializable receive()
          Receives a new message from the channel.
 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.
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.tribe.channel.ReliableGroupChannel
close, getCurrentGroup, getLocalMembership, send, send, setMembership
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JGroupsReliableChannel

public JGroupsReliableChannel(java.net.URL jgroupsConfigFile)
                       throws ChannelException
Creates a new JGroupsReliableChannel object

Method Detail

join

public void join(Group g)
          throws AlreadyMemberException,
                 ChannelException,
                 NotConnectedException
Description copied from class: ReliableGroupChannel
Join the group that has the given group identifier.

Overrides:
join in class ReliableGroupChannel
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
See Also:
ReliableGroupChannel.join(org.objectweb.tribe.common.Group)

quit

public void quit()
          throws ChannelException,
                 NotConnectedException
Description copied from class: ReliableGroupChannel
Quit the current group without closing the channel.

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

receive

public java.io.Serializable receive()
                             throws ChannelException,
                                    NotConnectedException
Description copied from class: ReliableGroupChannel
Receives a new message from the channel.

Overrides:
receive in class ReliableGroupChannel
Returns:
the new message
Throws:
ChannelException - if an error occurs
NotConnectedException - if the channel is not connected to any group
See Also:
ReliableGroupChannel.receive()

send

public java.util.ArrayList send(java.io.Serializable msg,
                                GroupIdentifier gid,
                                java.util.ArrayList members)
                         throws ChannelException,
                                NotConnectedException
Description copied from class: ReliableGroupChannel
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
See Also:
ReliableGroupChannel.send(java.io.Serializable, org.objectweb.tribe.common.GroupIdentifier, java.util.ArrayList)

toString

public java.lang.String toString()
See Also:
Object.toString()

getProperties

public java.lang.String getProperties()
Return the JGroups channel properties

Returns:
JGroups channel properties


Copyright © 2004 - ObjectWeb Consortium - All Rights Reserved.