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 registered ServiceLocator
    static void register​(ServiceLocator instance)
    Registers the ServiceLocator to be used at runtime.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • register

      public static final void register​(ServiceLocator instance)
      Registers the ServiceLocator 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

      public static final ServiceLocator getServiceLocator()
      Returns the currently registered ServiceLocator
      Returns:
      currently registered ServiceLocator