Class StartLevelService


  • @NonNullByDefault
    public class StartLevelService
    extends Object
    This service combines different ReadyMarkers into a new start level ready marker and thus lets other services depend on those, without having to know about the single markers. This brings an important decoupling, since the set of markers for a certain start level might depend on the individual set up- The start level service is therefore configurable, so that users have a chance to adapt the conditions upon a certain start level is reached. Start levels are defined as values between 0 and 100. They carry the following semantics: 00 - OSGi framework has been started. 10 - OSGi application start level has been reached, i.e. bundles are activated. 20 - Model entities (items, things, links, persist config) have been loaded, both from db as well as files. 30 - Item states have been restored from persistence service, where applicable. 40 - Rules are loaded and parsed, both from db as well as dsl and script files. 50 - Rule engine has executed all "system started" rules and is active. 70 - User interface is up and running. 80 - All things have been initialized. 100 - Startup is fully complete.
    Author:
    Kai Kreuzer - Initial contribution
    • Constructor Detail

      • StartLevelService

        public StartLevelService​(org.osgi.framework.BundleContext bundleContext,
                                 ReadyService readyService,
                                 EventPublisher eventPublisher)
    • Method Detail

      • activate

        protected void activate​(Map<String,​Object> configuration)
      • getStartLevel

        public int getStartLevel()
        Returns the current start level of openHAB
        Returns:
        the current start level
      • modified

        protected void modified​(Map<String,​Object> configuration)
      • deactivate

        protected void deactivate()