Class InitContext
java.lang.Object
com.scaleoutsoftware.digitaltwin.core.InitContext
The InitContext is passed as a parameter to the
DigitalTwinBase.init(InitContext)
method of an initializing
digital twin.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract String
getId()
Get the model-unique Id identifier of the initializing digital twin instance.abstract String
getModel()
Get the Model identifier of the initializing digital twin instance.abstract <T extends DigitalTwinBase>
TimerActionResultstartTimer
(String timerName, Duration interval, TimerType timerType, TimerHandler<T> timerHandler) Starts a new timer for the 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 nameinterval
- the timer intervaltimerType
- the timer typetimerHandler
- the time handler callback- Returns:
- returns
TimerActionResult.Success
if the timer was started,TimerActionResult.FailedTooManyTimers
if too many timers exist, orTimerActionResult.FailedInternalError
if 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.
-