Class EclipseContextFactory


  • public final class EclipseContextFactory
    extends java.lang.Object
    This factory is used to create new context instances.
    Since:
    1.3
    See Also:
    IEclipseContext
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IEclipseContext create()
      Creates and returns a new empty context.
      static IEclipseContext create​(java.lang.String name)
      Creates and returns a new empty context.
      static IEclipseContext createServiceContext​(org.osgi.framework.BundleContext bundleContext)
      Creates and returns a new context that can be used to lookup OSGi services.
      static IEclipseContext getServiceContext​(org.osgi.framework.BundleContext bundleContext)
      Returns a context that can be used to lookup OSGi services.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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​(java.lang.String name)
        Creates and returns a new empty context.
        Returns:
        A new empty context.
      • getServiceContext

        public static IEclipseContext getServiceContext​(org.osgi.framework.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​(org.osgi.framework.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