public class GroupCommunicationManager
extends java.lang.Object
| Constructor and Description |
|---|
GroupCommunicationManager(NodeConnection nodeConnection)
Default Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMembershipListener(GroupMembershipListener groupMembershipListener)
Adds a listenter to the Group Protocol.
|
void |
finalize() |
java.util.List<Group> |
getAllGroups()
Gets a list with all locally subscribed groups.
|
java.util.List<Group> |
getJoinedGroups()
Gets a list with all locally explicitly subscribed groups.
|
void |
joinGroup(Group group)
Makes the node to explicitly join the especified group.
|
void |
joinGroup(java.util.List<Group> groups)
Makes the node to explicitly join the especified groups.
|
void |
leaveGroup(Group group)
Makes the node to leave the explicitly joined group.
|
void |
leaveGroup(java.util.List<Group> groups)
Makes the node to leave the explicitly joined groups.
|
void |
removeMembershipListener(GroupMembershipListener groupMembershipListener)
Removes a listenter to the Group Protocol.
|
void |
sendGroupcastMessage(ApplicationMessage message,
Group group)
Sends a message to the specified group.
|
void |
sendGroupcastMessage(ApplicationMessage message,
java.util.List<Group> groups)
Sends a message to the specified groups.
|
public GroupCommunicationManager(NodeConnection nodeConnection)
nodeConnection - public void finalize()
finalize in class java.lang.Objectpublic void sendGroupcastMessage(ApplicationMessage message, Group group) throws java.io.IOException
message - the message to be sent.group - the group.java.io.IOExceptionpublic void sendGroupcastMessage(ApplicationMessage message, java.util.List<Group> groups) throws java.io.IOException
message - the message to be sent.groups - the groups.java.io.IOExceptionpublic java.util.List<Group> getJoinedGroups()
public java.util.List<Group> getAllGroups()
public void joinGroup(Group group) throws java.io.IOException
group - the required group.java.io.IOExceptionpublic void joinGroup(java.util.List<Group> groups) throws java.io.IOException
groups - the required groups.java.io.IOExceptionpublic void leaveGroup(Group group) throws java.io.IOException
group - the required group.java.io.IOExceptionpublic void leaveGroup(java.util.List<Group> groups) throws java.io.IOException
groups - the required groups.java.io.IOExceptionpublic void addMembershipListener(GroupMembershipListener groupMembershipListener)
groupMembershipListener - the listener.public void removeMembershipListener(GroupMembershipListener groupMembershipListener)
groupMembershipListener - the listener.