Class InitContext<T extends DigitalTwinBase<T>>
java.lang.Object
com.scaleoutsoftware.digitaltwin.abstractions.InitContext<T>
The InitContext is passed as a parameter to the
DigitalTwinBase.init(InitContext) method of an initializing
digital twin.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetId()Get the model-unique Id identifier of the initializing digital twin instance.abstract StringgetModel()Get the Model identifier of the initializing digital twin instance.abstract SharedDataRetrieve aSharedDataaccessor for globally shared data.abstract SharedDataRetrieve aSharedDataaccessor for this model's shared data.abstract TimerActionResultstartTimer(String timerName, Duration interval, TimerType timerType, TimerHandler<T> timerHandler, Class<? extends TimerHandler<T>> timerHandlerClass) Starts a new timer for the digital twin
-
Constructor Details
-
InitContext
public InitContext()Default constructor.
-
-
Method Details
-
startTimer
public abstract TimerActionResult startTimer(String timerName, Duration interval, TimerType timerType, TimerHandler<T> timerHandler, Class<? extends TimerHandler<T>> timerHandlerClass) Starts a new timer for the digital twin- Parameters:
timerName- the timer nameinterval- the timer intervaltimerType- the timer typetimerHandler- the time handler callbacktimerHandlerClass- the timer handler callback class- Returns:
- returns
TimerActionResult.Successif the timer was started,TimerActionResult.FailedTooManyTimersif too many timers exist, orTimerActionResult.FailedInternalErrorif an unexpected error occurs.
-
getId
Get the model-unique Id identifier of the initializing digital twin instance.- Returns:
- the id identifier.
-
getModel
Get the Model identifier of the initializing digital twin instance.- Returns:
- the model identifier.
-