Class InitContext

java.lang.Object
com.scaleoutsoftware.digitaltwin.core.InitContext

public abstract class InitContext extends Object
The InitContext is passed as a parameter to the DigitalTwinBase.init(InitContext) method of an initializing digital twin.
  • Constructor Details

    • InitContext

      public InitContext()
  • Method Details

    • startTimer

      public abstract <T extends DigitalTwinBase> TimerActionResult startTimer(String timerName, Duration interval, TimerType timerType, TimerHandler<T> timerHandler)
      Starts a new timer for the digital twin
      Type Parameters:
      T - the type of the digital twin
      Parameters:
      timerName - the timer name
      interval - the timer interval
      timerType - the timer type
      timerHandler - the time handler callback
      Returns:
      returns TimerActionResult.Success if the timer was started, TimerActionResult.FailedTooManyTimers if too many timers exist, or TimerActionResult.FailedInternalError if an unexpected error occurs.
    • getId

      public abstract String getId()
      Get the model-unique Id identifier of the initializing digital twin instance.
      Returns:
      the id identifier.
    • getModel

      public abstract String getModel()
      Get the Model identifier of the initializing digital twin instance.
      Returns:
      the model identifier.