Each application tapping into JXTA is a peer. Your JXTA
shell running on your desktop right now is a peer, as is mine on my
peers command displays all peers
already known to my peer, initially only myself and possibly a peer
I'm using as an intermediary outside my firewall/NAT.
Discovering other peers, peers of peers and so on, is just a
matter of propagating a remote discovery request using
Discovered peers (technically, their peer announcements) are cached
locally, stored in environment variables "peer#" where # is the
sequential integer associated with a particular peer. To flush all
known peers and begin again, use
Each peer belongs to a peer group. By default, each peer is a member of the global "NetPeerGroup" group, analagous to a world without area codes, where every phone number is globally unique. The majority of the time, however, we function within a particular community and can assume the presence of a limited number of appropriate peers. A peer group logically limits the scope of peers with whom you will be communicating, analagous to your local telephone area code. Upon joining a peer group, one sees only other member peers.
As with peers,
to find out what groups are known to your peer, use the
command; to propagate a group remote discovery request, use
To join a group, simply use
join -d group# where
"group#" is the environment variable in which the group advertisement is
stored. You are prompted for an identity; technically a UUID,
anything will do. To leave, use (surprisingly enough)
leave. Here I join the "tiggers" group, look
around for peers and leave.
Discovered group announcements, like peers, are cached locally; flush