|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.test.PeerGroupAppImpl
Constructor Summary | |
PeerGroupAppImpl()
|
Method Summary | |
void |
addGroup(net.jxta.protocol.PeerGroupAdvertisement groupAdv)
Adds the PeerGroupAdvertisement to the list of discovered Groups in the PeerGroup |
void |
addPeer(net.jxta.protocol.PeerGroupAdvertisement peerAdv)
Adds the PeerGroupAdvertisement to the list of discovered Peers in the PeerGroup |
void |
checkDiscoverResults()
check results of discovery request |
net.jxta.protocol.PipeAdvertisement |
createPipeAdvertisement()
creates a new PipeAdvertisment |
java.io.File |
getDirectory()
Returns the Group Directory for storing persistent data |
net.jxta.discovery.Discovery |
getDiscoveryPolicy()
Returns the DiscoveryPolicy for the PeerGroup |
java.lang.String |
getGid()
Returns the gid String for this PeerGroupApp |
java.util.Enumeration |
getGids()
Returns an Enumeration of the gid Strings of currently discovered Groups in the PeerGroup |
net.jxta.protocol.PeerGroupAdvertisement |
getGroup(java.lang.String gid)
Returns the PeerGroupAdvertisement of the requested Group |
java.lang.String |
getGroupName()
Returns the Group name for this PeerGroupApp |
java.util.Enumeration |
getGroups()
Returns an Enumeration of the PeerGroupAdvertisements of currently discovered Groups in the PeerGroup |
protected net.jxta.protocol.PeerGroupAdvertisement |
getNewPeerGroupAdvertisement(java.lang.String name)
Protected Methods to be overloaded by subclasses |
PeerGroupApp |
getParentApp()
Returns the parent PeerGroupApp for this PeerGroupApp |
net.jxta.protocol.PeerGroupAdvertisement |
getPeer(java.lang.String pid)
Returns the PeerGroupAdvertisement of the requested Peer |
net.jxta.protocol.PeerGroupAdvertisement |
getPeerAdvertisement()
Returns the getPeerAdvertisement for this PeerGroupApp |
net.jxta.peergroup.PeerGroup |
getPeerGroup()
Returns the PeerGroup for this PeerGroupApp |
net.jxta.protocol.PeerGroupAdvertisement |
getPeerGroupAdvertisement()
Returns the getPeerGroupAdvertisement for this PeerGroup |
java.lang.String |
getPeerName()
Returns the Peer name for this PeerGroupApp |
java.util.Enumeration |
getPeers()
Returns an Enumeration of the PeerGroupAdvertisements of currently discovered Peers in the PeerGroup |
java.lang.String |
getPid()
Returns the pid String for this PeerGroupApp |
java.util.Enumeration |
getPids()
Returns an Enumeration of the pid Strings of currently discovered Peers in the PeerGroup |
net.jxta.pipe.Pipe |
getPipePolicy()
Returns the PipePolicy for the PeerGroup |
void |
init(net.jxta.peergroup.PeerGroup group,
net.jxta.document.Advertisement adv)
Initialize the application |
protected void |
initDone()
|
protected boolean |
isValidPeer(net.jxta.protocol.PeerGroupAdvertisement newPeerAdv)
|
net.jxta.platform.Application |
joinGroup(java.lang.String gid)
Joins the PeerGroup with the given gid The group is only joined if the group is in the list and has not already been joined |
net.jxta.platform.Application |
joinNewGroup(java.lang.String name)
Creates a new PeerGroup with the given name and Joins the group |
net.jxta.document.Advertisement |
loadAdvertisement(java.io.File advFile)
load the advertisement located in the given file |
void |
pollDiscover(boolean flag)
set polling flag state if true, poll local discover results at regular intervals |
void |
removeGroup(java.lang.String gid)
Removes the PeerGroupAdvertisement for the given pid from the list of discovered Groups in the PeerGroup |
void |
removePeer(java.lang.String pid)
Removes the PeerGroupAdvertisement for the given pid from the list of discovered Peers in the PeerGroup |
protected boolean |
replaceTest(net.jxta.protocol.PeerGroupAdvertisement newPeerAdv,
net.jxta.protocol.PeerGroupAdvertisement oldPeerAdv)
|
void |
requestRemoteDiscover()
request remote discovery request |
void |
saveAdvertisement(net.jxta.document.Advertisement adv,
java.io.File advFile)
save the advertisement to the given file |
void |
setParentApp(PeerGroupApp parent)
Set the parent PeerGroupApp for this PeerGroupApp |
void |
setPeerName(java.lang.String name)
Set the Peer name for this PeerGroupApp |
int |
startApp(java.lang.String[] str)
PeerGroupApp Interface Methods |
protected void |
startPolicy()
|
void |
stopApp()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public PeerGroupAppImpl()
Method Detail |
public void init(net.jxta.peergroup.PeerGroup group, net.jxta.document.Advertisement adv) throws net.jxta.exception.PeerGroupException
group
- PeerGroup this application is started frompublic int startApp(java.lang.String[] str)
public void stopApp()
public net.jxta.peergroup.PeerGroup getPeerGroup()
public net.jxta.protocol.PeerGroupAdvertisement getPeerGroupAdvertisement()
public net.jxta.protocol.PeerGroupAdvertisement getPeerAdvertisement()
public java.lang.String getPid()
public java.lang.String getGid()
public java.lang.String getGroupName()
public java.lang.String getPeerName()
public void setPeerName(java.lang.String name)
name
- new name for this Peerpublic PeerGroupApp getParentApp()
public void setParentApp(PeerGroupApp parent)
parent
- new parent PeerGroupApppublic java.io.File getDirectory()
public net.jxta.discovery.Discovery getDiscoveryPolicy()
public net.jxta.pipe.Pipe getPipePolicy()
public java.util.Enumeration getPids()
public net.jxta.protocol.PeerGroupAdvertisement getPeer(java.lang.String pid)
pid
- Pid of the requested Peerpublic void addPeer(net.jxta.protocol.PeerGroupAdvertisement peerAdv)
peer
- PeerGroupAdvertisement of the Peer to addpublic void removePeer(java.lang.String pid)
pid
- Pid of the Peer to removepublic java.util.Enumeration getPeers()
public java.util.Enumeration getGids()
public net.jxta.protocol.PeerGroupAdvertisement getGroup(java.lang.String gid)
gid
- Gid of the requested Grouppublic void addGroup(net.jxta.protocol.PeerGroupAdvertisement groupAdv)
peer
- PeerGroupAdvertisement of the Group to addpublic void removeGroup(java.lang.String gid)
gid
- Gid of the Group to removepublic java.util.Enumeration getGroups()
public void pollDiscover(boolean flag)
flag
- new polling flag valuepublic net.jxta.platform.Application joinGroup(java.lang.String gid) throws net.jxta.exception.PeerGroupException
gid
- Gid of the requested Group to joinpublic net.jxta.platform.Application joinNewGroup(java.lang.String name) throws net.jxta.exception.PeerGroupException
gid
- Gid of the requested Group to joinpublic void requestRemoteDiscover()
public void checkDiscoverResults()
public net.jxta.document.Advertisement loadAdvertisement(java.io.File advFile)
advFile
- file that contains the Advertisementpublic void saveAdvertisement(net.jxta.document.Advertisement adv, java.io.File advFile)
adv
- the Advertisement to saveadvFile
- file to write the Advertisementpublic net.jxta.protocol.PipeAdvertisement createPipeAdvertisement()
protected net.jxta.protocol.PeerGroupAdvertisement getNewPeerGroupAdvertisement(java.lang.String name) throws net.jxta.exception.PeerGroupException
protected void initDone() throws net.jxta.exception.PeerGroupException
protected void startPolicy() throws net.jxta.exception.PeerGroupException
protected boolean isValidPeer(net.jxta.protocol.PeerGroupAdvertisement newPeerAdv)
protected boolean replaceTest(net.jxta.protocol.PeerGroupAdvertisement newPeerAdv, net.jxta.protocol.PeerGroupAdvertisement oldPeerAdv)
|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |