Package org.somda.sdc.glue.common
Interface DefaultStateValues
-
- All Implemented Interfaces:
public interface DefaultStateValuesImplementing classes of this interface can be used to define default values for states.
This interface enables ModificationsBuilder instances to transform an Mdib into 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 ModificationsBuilder if it contains functions of the following pattern:
The first method is called for each passed org.somda.sdc.biceps.model.participant.AbstractMetricState. Please note that this function is not called in case there is a method declaration with a type that derives from org.somda.sdc.biceps.model.participant.AbstractMetricState. In that case the method needs to call the more generated callback itself. The second method is called for each org.somda.sdc.biceps.model.participant.NumericMetricState.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 }