Class DefaultServiceDirectory

  • All Implemented Interfaces:
    ServiceDirectory

    public class DefaultServiceDirectory
    extends java.lang.Object
    implements ServiceDirectory
    Default implementation of the service directory using OSGi framework utilities.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T get​(java.lang.Class<T> serviceClass)
      Returns implementation of the specified service class.
      static <T> T getService​(java.lang.Class<T> serviceClass)
      Returns the reference to the implementation of the specified service.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultServiceDirectory

        public DefaultServiceDirectory()
    • Method Detail

      • getService

        public static <T> T getService​(java.lang.Class<T> serviceClass)
        Returns the reference to the implementation of the specified service.
        Type Parameters:
        T - type of service
        Parameters:
        serviceClass - service class
        Returns:
        service implementation
      • get

        public <T> T get​(java.lang.Class<T> serviceClass)
        Description copied from interface: ServiceDirectory
        Returns implementation of the specified service class.
        Specified by:
        get in interface ServiceDirectory
        Type Parameters:
        T - type of service
        Parameters:
        serviceClass - service class
        Returns:
        implementation class