Name

Module

Synopsis

Classes that implement this interface can be registered as services within a JXTA peergroup. The module advertisement used to register the service contains all of the information necessary to invoke the service: the location of the service’s code and its class name. The peergroup instantiates the module, calls its init( ) method to initialize it, and starts the module via the startApp( ) method. If the peergroup shuts down gracefully, it will call the stopApp( ) method before terminating.

public interface Module {
// Public Instance Methods
   public abstract void init(net.jxta.peergroup.PeerGroup group, net.jxta.id.ID assignedID, 
                             net.jxta.document.Advertisement implAdv) 
       throws net.jxta.exception.PeerGroupException;
   public abstract int startApp(String[ ] args);  
   public abstract void stopApp();  
}

Implementations

Application, net.jxta.service.Service

Returned By

net.jxta.peergroup.PeerGroup.loadModule()

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.