Interface DataStrategy<C>

Type Parameters:
C - the output type of onGet

public interface DataStrategy<C>
Service Provider Interface: this is not intended for external implementation See DataStrategies for available implementers of this interface. DataStrategy provides a strategy for conversion of data between internal and external forms. Use one of the constants provided in EPEx. Note: Only process models with autoscaling mode enabled are compatible with this interface.
  • Method Summary

    Modifier and Type
    Method
    Description
    onGet(Object sourceValue)
    Convert the sourceValue using this DataStrategy into an instance of class C.
    onPut(C sourceValue)
    Convert the sourceValue of class C using this DataStrategy into an object suitable for putting into EPEx.
    parameter(VariableReference variableReference, C data)
    Construct a Parameter, e.g., for Model.initiateAsynchronous.
    parameter(String namespace, String variableName, C data)
    Construct a Parameter, e.g., for Model.initiateAsynchronous.
  • Method Details

    • parameter

      Parameter<C> parameter(String namespace, String variableName, C data)
      Construct a Parameter, e.g., for Model.initiateAsynchronous. Note: Only process models with autoscaling mode enabled are compatible with this function.
      Parameters:
      namespace -
      variableName -
      data -
      Returns:
    • parameter

      Parameter<C> parameter(VariableReference variableReference, C data)
      Construct a Parameter, e.g., for Model.initiateAsynchronous. Note: Only process models with autoscaling mode enabled are compatible with this function.
      Parameters:
      variableReference -
      data -
      Returns:
    • onGet

      C onGet(Object sourceValue)
      Convert the sourceValue using this DataStrategy into an instance of class C. Note: Only process models with autoscaling mode enabled are compatible with this function.
      Parameters:
      sourceValue - must be of a class that this DataStrategy implementation expects.
      Returns:
      value representing sourceValue as an instance of class C.
    • onPut

      Object onPut(C sourceValue)
      Convert the sourceValue of class C using this DataStrategy into an object suitable for putting into EPEx. Note: Only process models with autoscaling mode enabled are compatible with this function.
      Parameters:
      sourceValue -
      Returns:
      value suitable for EPEx usage