Interface OMPlatform


public interface OMPlatform
Represents the platform that bundles are deployed into, whether OSGi is running or not.
Author:
Eike Stepper
No Implement
This interface is not intended to be implemented by clients.
No Extend
This interface is not intended to be extended by clients.
  • Field Details

  • Method Details

    • bundle

      OMBundle bundle(String bundleID, Class<?> accessor)
    • isOSGiRunning

      boolean isOSGiRunning()
    • isExtensionRegistryAvailable

      boolean isExtensionRegistryAvailable()
      Since:
      2.0
    • isDebugging

      boolean isDebugging()
    • setDebugging

      void setDebugging(boolean debugging)
    • addLogFilter

      void addLogFilter(OMLogFilter logFilter)
      Since:
      3.2
    • removeLogFilter

      void removeLogFilter(OMLogFilter logFilter)
      Since:
      3.2
    • addLogHandler

      void addLogHandler(OMLogHandler logHandler)
    • removeLogHandler

      void removeLogHandler(OMLogHandler logHandler)
    • addTraceHandler

      void addTraceHandler(OMTraceHandler traceHandler)
    • removeTraceHandler

      void removeTraceHandler(OMTraceHandler traceHandler)
    • getUserFolder

      File getUserFolder()
      Since:
      3.18
    • getStateFolder

      File getStateFolder()
    • getConfigFolder

      File getConfigFolder()
    • getConfigFile

      File getConfigFile(String name)
    • getConfigProperties

      Properties getConfigProperties(String name)
    • getProperty

      String getProperty(String key)
      Since:
      3.0
    • getProperty

      String getProperty(String key, String defaultValue)
      Since:
      3.0
    • getProperty

      int getProperty(String key, int defaultValue)
      Since:
      3.8
    • getProperty

      long getProperty(String key, long defaultValue)
      Since:
      3.8
    • getProperty

      <T extends Enum<T>> T getProperty(String key, Class<T> enumType)
      Since:
      3.8
    • getProperty

      <T extends Enum<T>> T getProperty(String key, T defaultValue)
      Since:
      3.8
    • isProperty

      boolean isProperty(String key)
      Since:
      3.7
    • isProperty

      boolean isProperty(String key, boolean defaultValue)
      Since:
      3.7
    • getCommandLineArgs

      String[] getCommandLineArgs() throws IllegalStateException
      Throws:
      IllegalStateException
      Since:
      3.2
    • createManagedContainer

      IManagedContainer createManagedContainer(String name)
      Creates a new independent managed container appropriate for the current runtime platform, initializes it with the platform and declarative contributions available to it, activates it, and returns it ready for use. In OSGi this is a PluginContainer; outside OSGi it is a StandaloneContainer, which discovers IManagedContainerInitializer providers through ServiceLoader during activation. Each invocation creates a new container; it is distinct from the canonical global IManagedContainer.INSTANCE. See also ContainerUtil.createInitializedContainer() and the raw ContainerUtil.createContainer().
      Parameters:
      name - the name to assign to the container, or null to use the platform default name.
      Returns:
      a newly created active container, independent of IManagedContainer.INSTANCE.
      Since:
      3.31
    • createManagedContainer

      default IManagedContainer createManagedContainer()
      Creates a new independent managed container appropriate for the current runtime platform, initializes it with available platform and declarative contributions, activates it, and returns it ready for use. In OSGi this is a PluginContainer; outside OSGi it is a StandaloneContainer whose activation discovers IManagedContainerInitializer providers through ServiceLoader. Each invocation returns a new container distinct from the canonical global IManagedContainer.INSTANCE. See also ContainerUtil.createInitializedContainer() and the raw ContainerUtil.createContainer().
      Returns:
      a newly created active container, independent of IManagedContainer.INSTANCE.
      Since:
      3.31