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?
Created May 4, 2012
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();