|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines a JXTA peer group application. All JXTA applications need to implement this interface. Jxta Applications are given their initialization parameters via the init() method rather than a non-default constructor.
Applications are passed the peer group they are created within. From the peergroup object, applications can acccess all the peer group services. Each application will be passed the peergroup they are started in. PeerGroups themselves are subclasses of JXTA Applications, as well as Services. The initial root peer group is known as the World Peer Group and is implemented by an object of class Platform, a subclass of PeerGroup. The "parent" PeerGroup of the World Peer Group is null.
Each peer group defines a default application that is started as part the peer group initialization process, if the PeerGroup's startApp() method is invoked. The Default application is specified by the PeerGroup's advertisement and can be the JXTA Shell or any other JXTA Application, as specified by the group's advertisment.
PeerGroup
,
Service
,
PeerGroupAdvertisement
Method Summary | |
void |
init(PeerGroup group,
Advertisement adv)
Initialize the application passing it its peer group and advertisement. |
int |
startApp(java.lang.String[] args)
Some applications will wait for start() being called, before proceeding beyond a certain point. |
void |
stopApp()
One can ask an application to stop. |
Method Detail |
public void init(PeerGroup group, Advertisement adv) throws PeerGroupException
group
- PeerGroup this application is started fromadv
- The advertisement for this applicationPeerGroupException
- failure to initialize this application.public int startApp(java.lang.String[] args)
public void stopApp()
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |