Package org.openhab.core.service
Class StartLevelService
java.lang.Object
org.openhab.core.service.StartLevelService
This service combines different
ReadyMarker
s 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 from db, dsl and script files are loaded and parsed, script engine factories are available.
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
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
ConstructorDescriptionStartLevelService
(org.osgi.framework.BundleContext bundleContext, ReadyService readyService, EventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
int
Returns the current start level of openHABprotected void
-
Field Details
-
STARTLEVEL_MARKER_TYPE
- See Also:
-
STARTLEVEL_OSGI
public static final int STARTLEVEL_OSGI- See Also:
-
STARTLEVEL_MODEL
public static final int STARTLEVEL_MODEL- See Also:
-
STARTLEVEL_STATES
public static final int STARTLEVEL_STATES- See Also:
-
STARTLEVEL_RULES
public static final int STARTLEVEL_RULES- See Also:
-
STARTLEVEL_RULEENGINE
public static final int STARTLEVEL_RULEENGINE- See Also:
-
STARTLEVEL_UI
public static final int STARTLEVEL_UI- See Also:
-
STARTLEVEL_THINGS
public static final int STARTLEVEL_THINGS- See Also:
-
STARTLEVEL_COMPLETE
public static final int STARTLEVEL_COMPLETE- See Also:
-
-
Constructor Details
-
StartLevelService
public StartLevelService(org.osgi.framework.BundleContext bundleContext, ReadyService readyService, EventPublisher eventPublisher)
-
-
Method Details
-
activate
-
getStartLevel
public int getStartLevel()Returns the current start level of openHAB- Returns:
- the current start level
-
modified
-
deactivate
protected void deactivate()
-