Package io.openems.edge.core.appmanager
Class AppValidateWorker
- java.lang.Object
-
- io.openems.common.worker.AbstractWorker
-
- io.openems.edge.core.appmanager.AppValidateWorker
-
public class AppValidateWorker extends AbstractWorker
This Worker constantly validates:.- that all enabled OpenEMS Apps are properly configured, including required OpenEMS Components, IP addresses, Scheduler settings, etc.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>
defectiveApps
Map from App to defect details.-
Fields inherited from class io.openems.common.worker.AbstractWorker
ALWAYS_WAIT_FOR_TRIGGER_NEXT_RUN, DO_NOT_WAIT, thread
-
-
Constructor Summary
Constructors Constructor Description AppValidateWorker(AppManagerImpl parent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configurationEvent(org.osgi.service.cm.ConfigurationEvent event)
Called byConfigurationListener
.protected java.lang.String
debugLog()
Called by parent debugLog.protected void
forever()
This method is called in a loop forever until the Thread gets interrupted.protected int
getCycleTime()
Gets the cycleTime of this worker in [ms].void
triggerNextRun()
Allows the next execution of the forever() method.protected void
validateApp(OpenemsApp app, OpenemsAppInstance instance)
Validates all Apps.protected void
validateApps()
Validates all Apps.-
Methods inherited from class io.openems.common.worker.AbstractWorker
activate, deactivate, modified
-
-
-
-
Constructor Detail
-
AppValidateWorker
public AppValidateWorker(AppManagerImpl parent)
-
-
Method Detail
-
configurationEvent
protected void configurationEvent(org.osgi.service.cm.ConfigurationEvent event)
Called byConfigurationListener
.- Parameters:
event
- aConfigurationEvent
-
debugLog
protected java.lang.String debugLog()
Called by parent debugLog.- Returns:
- a debug log String or null
-
forever
protected void forever()
Description copied from class:AbstractWorker
This method is called in a loop forever until the Thread gets interrupted.- Specified by:
forever
in classAbstractWorker
-
getCycleTime
protected int getCycleTime()
Description copied from class:AbstractWorker
Gets the cycleTime of this worker in [ms].- > 0 sets the minimum execution time of one Cycle
- = 0 never wait between two consecutive executions of forever()
- < 0 causes the Cycle to sleep forever until 'triggerNextRun()' is called
- Specified by:
getCycleTime
in classAbstractWorker
- Returns:
- the cycleTime
-
triggerNextRun
public void triggerNextRun()
Description copied from class:AbstractWorker
Allows the next execution of the forever() method.- Overrides:
triggerNextRun
in classAbstractWorker
-
validateApp
protected void validateApp(OpenemsApp app, OpenemsAppInstance instance)
Validates all Apps.'protected' so that it can be used in a JUnit test.
- Parameters:
app
- theOpenemsApp
instance
- the App instance
-
validateApps
protected void validateApps()
Validates all Apps.'protected' so that it can be used in a JUnit test.
-
-