Package com.j_spaces.core.jini
Class SharedDiscoveryManagement
java.lang.Object
com.j_spaces.core.jini.SharedDiscoveryManagement
A helper allowing to share and return cached LDM and SDM.
In order to get an LDM, the getLookupDiscoveryManager(String[], net.jini.core.discovery.LookupLocator[], net.jini.discovery.DiscoveryListener) should be called
and be used as normal. Terminate will reomve it from the cache if needed.
In order to get an SDM, the getBackwardsServiceDiscoveryManager(String[], net.jini.core.discovery.LookupLocator[], net.jini.discovery.DiscoveryListener) should be used
(internally, it will also use a shared LDM). NOTE: If a lookup cache is created using the SDM,
make sure to close it explicitly since terminating the SDM will not necesseraly actually
terminate it, leaving the lookup cache open.
- Author:
- kimchy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.static classstatic classstatic classstatic class -
Method Summary
Modifier and TypeMethodDescriptionstatic voidgetBackwardsServiceDiscoveryManager(String[] groups, LookupLocator[] locators, DiscoveryListener listener) static LookupDiscoveryManagergetLookupDiscoveryManager(String[] groups, LookupLocator[] locators, DiscoveryListener listener) getServiceDiscoveryManager(String[] groups, LookupLocator[] locators, DiscoveryListener listener) getServiceDiscoveryManagerResult(LookupDiscoveryManager ldm, String[] groups, LookupLocator[] locators, DiscoveryListener listener)
-
Method Details
-
getLookupDiscoveryManager
public static LookupDiscoveryManager getLookupDiscoveryManager(String[] groups, LookupLocator[] locators, DiscoveryListener listener) throws IOException - Throws:
IOException
-
getBackwardsServiceDiscoveryManager
public static SharedDiscoveryManagement.SharedServiceDiscoveryManager getBackwardsServiceDiscoveryManager(String[] groups, LookupLocator[] locators, DiscoveryListener listener) throws IOException - Throws:
IOException
-
getServiceDiscoveryManager
public static SharedDiscoveryManagement.SharedServiceDiscoveryManager getServiceDiscoveryManager(String[] groups, LookupLocator[] locators, DiscoveryListener listener) throws IOException - Throws:
IOException
-
getServiceDiscoveryManagerResult
public static SharedDiscoveryManagement.SharedServiceDiscoveryManagerResult getServiceDiscoveryManagerResult(LookupDiscoveryManager ldm, String[] groups, LookupLocator[] locators, DiscoveryListener listener) throws IOException - Throws:
IOException
-
forceTerminate
public static void forceTerminate()
-