Class ServiceLocatorRegistry
java.lang.Object
com.onenetwork.platform.env.servicelocator.ServiceLocatorRegistry
public final class ServiceLocatorRegistry
extends java.lang.Object
Central registry for the
ServiceLocator
instance to be used at runtime. Rarely used directly by clients - prefer Services.get(Class)
.-
Method Summary
Modifier and Type Method Description static ServiceLocator
getServiceLocator()
Returns the currently registeredServiceLocator
static void
register(ServiceLocator instance)
Registers theServiceLocator
to be used at runtime.
-
Method Details
-
register
Registers theServiceLocator
to be used at runtime. Note that only one such ServiceLocator is allowed at any one time.- Parameters:
instance
- ServiceLocator to be used at runtime
-
getServiceLocator
Returns the currently registeredServiceLocator
- Returns:
- currently registered ServiceLocator
-