Interface SafeModeManager

All Known Implementing Classes:
DefaultSafeModeManager

@PublicSpi public interface SafeModeManager
Controls what plugins are enabled when plugins are disabled from start-up using command-line options. (NB: this is currently not the same as safe-mode as defined in UPM, as UPM allows the user to restore the system to how it was before entering safe-mode) DefaultSafeModeManager should be suitable for most implementations
  • Field Details

    • START_ALL_PLUGINS

      static final SafeModeManager START_ALL_PLUGINS
      Default implementation of safe mode manager Just a convenient way to start all the plugins skipping all checks
  • Method Details

    • pluginShouldBeStarted

      boolean pluginShouldBeStarted(Plugin plugin, Iterable<ModuleDescriptor> descriptors)
      This checks if a plugin should be started when safe-mode is on
      Parameters:
      plugin - to be checked if it should be started
      descriptors - list of module descriptors to find the plugin references that must be started in safe mode (this is kinda tricky way to do such search, but the only available at the startup phase)
      Returns:
      true if plugin should be started when the product starts up or false otherwise
    • isInSafeMode

      boolean isInSafeMode()
    • isRequiredPlugin

      default boolean isRequiredPlugin(Plugin plugin)