Skip to main content

How to create a new peer group in JXTA 2.5?

2 replies [Last post]
liangyitao
Offline
Joined: 2007-09-17

In the JXTA 2.5, the method "PeerGroupFactory.newPeerGroup()" has been deprecated without alternative. The API document says that it wasn't useful. What does it mean and how to create a custom peer group in the JXTA 2.5? Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
liangyitao
Offline
Joined: 2007-09-17

OK. I've got a template below:
--------------------------------------------------------
ModuleImplAdvertisement implAdv = [u]netPeerGroup[/u].getAllPurposePeerGroupImplAdvertisement();
newPeerGroup = [u]netPeerGroup[/u].newGroup(null, // Peer group ID
        implAdv, // Peer group advertisement
        "Group name", // Peer group name
        "Group description" // Peer group description
        );
--------------------------------------------------------
It seems that all jobs are assigned to the Net Peer Group. That's quite reasonable.
But does someone know why the name of the peer group advertisement creation method is so complex (I mean "AllPurposePeerGroupImplAdvertisement")?

keesp
Offline
Joined: 2007-05-22

Creating a netpeergroup is now done in with the NetworkManager (net.jxta.platform). See the 2.5.0 documentation for details

Kees