|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.tribe.channel.ReliableGroupChannel
This class defines a ReliableGroupChannel
Field Summary | |
protected AbstractChannelPool |
channelPool
|
protected Group |
currentGroup
|
protected ReceiveBuffer |
incomingBuffer
|
protected Member |
me
|
Constructor Summary | |
ReliableGroupChannel()
Creates a new ReliableGroupChannel object without group
membership service. |
Method Summary | |
void |
close()
Closes the channel (also quits the current group if any). |
Group |
getCurrentGroup()
Returns the current group we are connected to or null if we are not connected to any group. |
Member |
getLocalMembership()
Returns the local membership value (Member object representing this channel in the group). |
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)
Sends the given message to all members of the group. |
java.util.ArrayList |
send(java.io.Serializable msg,
java.util.ArrayList members)
Sends a message to a subset of group members. |
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. |
protected void |
setMembership(Member membership)
Sets the membership value (me as a Member of the group). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected AbstractChannelPool channelPool
protected ReceiveBuffer incomingBuffer
protected Group currentGroup
protected Member me
Constructor Detail |
public ReliableGroupChannel()
ReliableGroupChannel
object without group
membership service.
Method Detail |
public void join(Group g) throws AlreadyMemberException, ChannelException, NotConnectedException
AlreadyMemberException
- if we are already member of the group
NotConnectedException
- if the channel is not connected
ChannelException
- if an error is reported by the channelpublic void quit() throws ChannelException, NotConnectedException
ChannelException
- if a communication error occurs
NotConnectedException
- if the channel is not connected to any grouppublic Group getCurrentGroup()
public java.util.ArrayList send(java.io.Serializable msg) throws ChannelException, NotConnectedException
msg
- message to send
ArrayList
of Members who failed, or null if all
members received successfully the message.
ChannelException
- if an error occurs
NotConnectedException
- if the channel is not connected to any grouppublic java.util.ArrayList send(java.io.Serializable msg, java.util.ArrayList members) throws ChannelException, NotConnectedException
msg
- message to sendmembers
- ArrayList
of Member
that are
all part of the group
ArrayList
of Members who failed, or null if all
members received successfully the message.
ChannelException
- if an error occurs
NotConnectedException
- if the channel is not connected to any grouppublic java.util.ArrayList send(java.io.Serializable msg, GroupIdentifier gid, java.util.ArrayList members) throws ChannelException, NotConnectedException
msg
- message to sendmembers
- ArrayList
of Member
that are
all part of the group
ArrayList
of Members who failed, or null if all
members received successfully the message.
ChannelException
- if an error occurs
NotConnectedException
- if the channel is not connected to any grouppublic java.io.Serializable receive() throws ChannelException, NotConnectedException
ChannelException
- if an error occurs
NotConnectedException
- if the channel is not connected to any grouppublic void close() throws ChannelException, NotConnectedException
ChannelException
- if a network error occurs
NotConnectedException
- if the channel is not connectedpublic Member getLocalMembership()
protected void setMembership(Member membership) throws NotConnectedException
membership
- The me to set.
NotConnectedException
- if the channel is not currently connected to
any group
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |