获取peergroup的所有peers(Getting a list of the peers in a PeerGroup)

sellami_med  

Posts: 7
 Getting a list of the peers in a PeerGroup?
Posted: Apr 4, 2008 3:51 AM
 
 Click to reply to this thread Reply

Hi,
I'm just begining working with jxta and I would like to know how to get a list of all peers in a PeerGroup.
Thanks

adamman71  

Posts: 115
 Re: Getting a list of the peers in a PeerGroup?
Posted: Apr 4, 2008 9:05 AM   in response to: sellami_med
 
 Click to reply to this thread Reply

Peers can be active or inactive (i.e., connected) in your peer group. If you are interested in all peers regardless of whether they are connected for a time being, you should try to collect all Peer Advertisements in your peer group.

Cheers,

J.

bondolo  

Posts: 118
 Re: Getting a list of the peers in a PeerGroup?
Posted: Apr 4, 2008 9:47 AM   in response to: sellami_med
 
 Click to reply to this thread Reply

Getting all of the peers within a peer group is not generally possible. Requesting all of the peers is a bit like asking what all the available telephone numbers are worldwide. As Jerome points out there's also the matter of active peers versus known peers. Which are you seeking?

You may want to read this blog entry regarding discovery. It may help answer some questions about how JXTA is meant to work : http://blogs.sun.com/bondolo/entry/more_discovery

ttshabnam  

Posts: 2
 help to set the environment
Posted: Apr 9, 2008 8:02 AM   in response to: bondolo
 
 Click to reply to this thread Reply

hello, i m a very new user of jxta/jxme. i m working with jxta/jxme for my final year project. for the last few days i was just searching how to set up the environment to code jxta/jxme in netbeans. but i can't find any proper documents. i have installed netbeans ide 5.0, netbeans mobility pack 5.0, j2me wireless toolkit 2.2 and have downloaded jxme-2.2.3-bin.zip and jxme-2.1.3-source.zip. would you plz tell me what additional files i would need and how to set up the environment in netbeans? is jxta essential to run jxme?

plz help me as soon as possible! its very urgent!

sellami_med  

Posts: 7
 Re: Getting a list of the peers in a PeerGroup?
Posted: Apr 4, 2008 10:05 AM   in response to: sellami_med
 
 Click to reply to this thread Reply

First thank for your responses.
I think I should further explain my need so you can help me.
I created a PeerGroup and i published his advertisement. Then a created tow peers (by default in the NetPeer group), then i make them join the PeerGroup.

What i want now is to list the peers connected to my group for verification.

adamman71  

Posts: 115
 Re: Getting a list of the peers in a PeerGroup?
Posted: Apr 9, 2008 2:53 AM   in response to: sellami_med
Correct
 Click to reply to this thread Reply

In that case, I would retrieve the DiscoveryService from your peer group and use the getRemoteAdvertisements() method to retrieve your peer's advertisements.

Cheers,

J.

sellami_med  

Posts: 7
 Re: Getting a list of the peers in a PeerGroup?
Posted: Apr 9, 2008 4:45 AM   in response to: adamman71
 
 Click to reply to this thread Reply

That's what I did and it works.
Thanks for your help
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值