Class OSGiClassLoaderServiceImpl

  • All Implemented Interfaces:
    java.io.Serializable, ClassLoaderService, Service, Stoppable

    public class OSGiClassLoaderServiceImpl
    extends org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl
    implements ClassLoaderService
    The ClassLoaderService that should be used when running in OSGi; this helps for example to load the Services correctly.
    See Also:
    Serialized Form
    • Method Detail

      • loadJavaServices

        public <S> java.util.LinkedHashSet<S> loadJavaServices​(java.lang.Class<S> serviceContract)
        Description copied from interface: ClassLoaderService
        Discovers and instantiates implementations of the named service contract.

        NOTE : the terms service here is used differently than Service. Instead here we are talking about services as defined by ServiceLoader.

        Specified by:
        loadJavaServices in interface ClassLoaderService
        Overrides:
        loadJavaServices in class org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl
        Type Parameters:
        S - The type of the service contract
        Parameters:
        serviceContract - The java type defining the service contract
        Returns:
        The ordered set of discovered services.
      • stop

        public void stop()
        Description copied from interface: Stoppable
        Stop phase notification
        Specified by:
        stop in interface Stoppable
        Overrides:
        stop in class org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl