Class DefaultServiceDirectory

  • All Implemented Interfaces:
    ServiceDirectory

    public class DefaultServiceDirectory
    extends Object
    implements ServiceDirectory
    Default implementation of the service directory using OSGi framework utilities.
    • Constructor Detail

      • DefaultServiceDirectory

        public DefaultServiceDirectory()
    • Method Detail

      • getService

        public static <T> T getService​(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​(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