|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeer2me.domain.DataPackage
peer2me.domain.GroupSyncPackage
A GroupSyncPackage is a package used internally in the framework to synchronize the groups containing the participants. The participant performing the groupsync uses its own group as content of the package. All the receivers synchronizes their groups based on the information found in the GroupSyncPackage.
Field Summary |
Fields inherited from class peer2me.domain.DataPackage |
FILE_PACKAGE, GROUP_SYNC_PACKAGE, log, TEXT_PACKAGE |
Constructor Summary | |
GroupSyncPackage()
Constructor used to create an empty GroupSyncPackage object to fill with the parseBytes() method |
|
GroupSyncPackage(Node sender,
java.lang.String[] recipients,
Node[] participatingNodes)
Constructor |
Method Summary | |
Node[] |
getParticipants()
This method returns a list of the nodes that are participating in the network (group) |
void |
parseBytes(byte[] data)
This method parses the content of the byte array (byte[]) back into a GroupSyncPackage object |
byte[] |
toSendableFormat()
This method transforms this groupsync package into a byte array (byte[]) that is possible to send over a network stream |
Methods inherited from class peer2me.domain.DataPackage |
getRecipients, getSender, getType, setRecipients, setSender |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public GroupSyncPackage(Node sender, java.lang.String[] recipients, Node[] participatingNodes)
sender
- A node object representing the sender noderecipients
- The addresses to the recipients of the groupsync packageparticipatingNodes
- A hashtable with node addresses as keys and names as valuespublic GroupSyncPackage()
Method Detail |
public Node[] getParticipants()
public byte[] toSendableFormat()
toSendableFormat
in class DataPackage
public void parseBytes(byte[] data)
parseBytes
in class DataPackage
data
- The byte[] containing the data representing the GroupSyncPackage object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |