Rio Project 4.2 API Documentation



org.rioproject.resources.client
Class DiscoveryManagementPool.SharedDiscoveryManager

java.lang.Object
  extended by net.jini.discovery.LookupDiscoveryManager
      extended by org.rioproject.resources.client.DiscoveryManagementPool.SharedDiscoveryManager
All Implemented Interfaces:
DiscoveryGroupManagement, DiscoveryLocatorManagement, DiscoveryManagement
Enclosing class:
DiscoveryManagementPool

public static class DiscoveryManagementPool.SharedDiscoveryManager
extends LookupDiscoveryManager

The SharedDiscoveryManager extends LookupDiscoveryManager and maintains a reference counter for how many clients are sharing the instance. The reference counter is used to determine if the LookupDiscoveryManager should be terminated. The reference counter is incremented each time this instance is shared, and decremented each time the terminate method is called. If the reference counter goes to zero upon termination the LookupDiscoveryManager will be terminated


Field Summary
 
Fields inherited from class net.jini.discovery.LookupDiscoveryManager
FROM_GROUP, FROM_LOCATOR
 
Fields inherited from interface net.jini.discovery.DiscoveryGroupManagement
ALL_GROUPS, NO_GROUPS
 
Constructor Summary
DiscoveryManagementPool.SharedDiscoveryManager(DiscoveryManagementPool.DiscoveryControl discoControl, String[] groups, LookupLocator[] locators, DiscoveryListener listener)
           
DiscoveryManagementPool.SharedDiscoveryManager(DiscoveryManagementPool.DiscoveryControl discoControl, String[] groups, LookupLocator[] locators, DiscoveryListener listener, Configuration config)
           
 
Method Summary
 String getSharedName()
           
 void terminate()
          Override parent's terminate method.
 
Methods inherited from class net.jini.discovery.LookupDiscoveryManager
addDiscoveryListener, addGroups, addLocators, discard, getFrom, getGroups, getLocators, getRegistrars, removeDiscoveryListener, removeGroups, removeLocators, setGroups, setLocators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoveryManagementPool.SharedDiscoveryManager

public DiscoveryManagementPool.SharedDiscoveryManager(DiscoveryManagementPool.DiscoveryControl discoControl,
                                                      String[] groups,
                                                      LookupLocator[] locators,
                                                      DiscoveryListener listener)
                                               throws IOException
Throws:
IOException

DiscoveryManagementPool.SharedDiscoveryManager

public DiscoveryManagementPool.SharedDiscoveryManager(DiscoveryManagementPool.DiscoveryControl discoControl,
                                                      String[] groups,
                                                      LookupLocator[] locators,
                                                      DiscoveryListener listener,
                                                      Configuration config)
                                               throws IOException,
                                                      ConfigurationException
Throws:
IOException
ConfigurationException
Method Detail

getSharedName

public String getSharedName()

terminate

public void terminate()
Override parent's terminate method. Only call LookupDiscoveryManager.terminate() if there are no clients or users.

Specified by:
terminate in interface DiscoveryManagement
Overrides:
terminate in class LookupDiscoveryManager

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.