In the version of JoinManager included in Jini 1.1, both the getGroups() and the getLocators() methods have been removed. How can I get the locator and group lists without these methods?

Tim Rohaly

The new version, net.jini.lookup.JoinManager, has an additional required argument in the constructor; you need to pass an instance of a class that implements DiscoveryManagement. It is this DiscoveryManagement class that is responsible for handling the discovery process. If you specify a null value for this constructor argument, JoinManager will create and use an instance of LookupDiscoveryManager for you. You may query this instance of LookupDiscoveryManager using its getGroups() and getLocators() methods that were formerly defined as part of the JoinManager class.

Old (version 1.0):
    Entry[] attrSets = ...
    ServiceIDListener callback = ...
    LeaseRenewalManager leaseMgr = ...
    JoinManager jm = new JoinManager(attrSets, callback, leaseMgr)
    String[]        groups   = jm.getGroups();
    LookupLocator[] locators = jm.getLocators();

New (version 1.1):
    DiscoveryManagement discoverMgr = null;
    JoinManager jm = new JoinManager(attrSets, callback, discoverMgr, leaseMgr)
    String[]        groups   = jm.getDiscoverManager().getGroups();
    LookupLocator[] locators = jm.getDiscoverManager().getLocators();
0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact