public interface BackgroundRunnable
extends java.lang.Runnable
BaseBackgroundRunnable
class. Please see the source code in package
com.mgnt.lifecycle.management.backgroundrunner.example
that demonstrates the usage of this frameworkModifier and Type | Method and Description |
---|---|
TimeInterval |
getTaskExecutionInterval() |
void |
initTimeIntervalParam(java.lang.String valueStr,
TimeInterval defaultValue,
java.lang.String propertyName)
This is internally implemented method (in class
BaseBackgroundRunnable ) it allows to initialize
other properties of type TimeInterval If such properties exist then the user will need to override
method setParamValue(TimeInterval, String) so it will know what setter method to invoke based on
propertyName parameter. |
boolean |
isInitialized()
internally used method
|
void |
setInitialized(boolean initialized)
internally used method
|
void |
setParamValue(TimeInterval value,
java.lang.String property)
This method is a general setter method for all properties that hold
TimeInterval value. |
TimeInterval getTaskExecutionInterval()
TimeInterval
that specifies how often the Task should be runvoid initTimeIntervalParam(java.lang.String valueStr, TimeInterval defaultValue, java.lang.String propertyName)
BaseBackgroundRunnable
) it allows to initialize
other properties of type TimeInterval
If such properties exist then the user will need to override
method setParamValue(TimeInterval, String)
so it will know what setter method to invoke based on
propertyName parameter. See the source code for class
com.mgnt.lifecycle.management.backgroundrunner.example.TypeOneTask that demonstrates this featurevalueStr
- String that contains a Time interval value such as "9h", "3m", "10s" etcdefaultValue
- TimeInterval
that holds a default value for the property should parsing of valueStr
parameter failspropertyName
- The name of the property to be setvoid setParamValue(TimeInterval value, java.lang.String property)
TimeInterval
value. It should be
implemented by user defined class implementing this interface. See source code for classes
TypeOneTask
and
TypeTwoTask
where one provide complex example
in which there are other properties besides Task Execution Interval and second that demonstrates a minimalistic
implementationvalue
- TimeInterval
value for the propertyproperty
- name of the property to be setboolean isInitialized()
void setInitialized(boolean initialized)
initialized
-