Package org.somda.sdc.glue.common
Interface DefaultStateValues
-
- All Known Implementing Classes:
RequiredDefaultStateValues
public interface DefaultStateValuesImplementing classes of this interface can be used to define default values for states.This interface enables
ModificationsBuilderinstances to transform anMdibinto a modifications set in which every generated state visits a callback function of the implementing class.For each state type that is supposed to have a default value, a class derived from DefaultStateValues is recognized by a
ModificationsBuilderif it contains functions of the following pattern:void onFoo(AbstractMetricState state) { // modify any abstract metric state type here // NumericMetricState is not affected as there is another callback defined } void onBar(NumericMetricState state) { // Every NumericMetricState goes to this callback }The first method is called for each passedAbstractMetricState. Please note that this function is not called in case there is a method declaration with a type that derives fromAbstractMetricState. In that case the method needs to call the more generated callback itself. The second method is called for eachNumericMetricState.