Class EclipseContextFactory


  • public final class EclipseContextFactory
    extends Object
    This factory is used to create new context instances.
    Since:
    1.3
    See Also:
    IEclipseContext
    • Constructor Detail

      • EclipseContextFactory

        public EclipseContextFactory()
    • Method Detail

      • create

        public static IEclipseContext create()
        Creates and returns a new empty context.
        Returns:
        A new empty context.
      • create

        public static IEclipseContext create​(String name)
        Creates and returns a new empty context.
        Returns:
        A new empty context.
      • getServiceContext

        public static IEclipseContext getServiceContext​(BundleContext bundleContext)
        Returns a context that can be used to lookup OSGi services. A client must never dispose the provided context, because it may be shared by multiple callers.
        Parameters:
        bundleContext - The bundle context to use for service lookup
        Returns:
        A context containing all OSGi services
      • createServiceContext

        public static IEclipseContext createServiceContext​(BundleContext bundleContext)
        Creates and returns a new context that can be used to lookup OSGi services. A client must dispose the provided context.
        Parameters:
        bundleContext - The bundle context to use for service lookup
        Returns:
        A new context containing all OSGi services
        Since:
        1.5