Class AbstractStaticDrivenValue<T>
java.lang.Object
com.inductiveautomation.perspective.gateway.driven.AbstractStaticDrivenValue<T>
- Type Parameters:
T- The type of the static value
- All Implemented Interfaces:
DrivenValue<T>
An AbstractStaticDrivenValue is a
DrivenValue which never changes. Therefore, it is always ready and never
dirty.-
Constructor Details
-
AbstractStaticDrivenValue
-
-
Method Details
-
startup
public void startup()Description copied from interface:DrivenValueLifecycle hook to start up the driven value- Specified by:
startupin interfaceDrivenValue<T>
-
shutdown
public void shutdown()Description copied from interface:DrivenValueLifecycle hook to shut down the driven value- Specified by:
shutdownin interfaceDrivenValue<T>
-
isReady
public boolean isReady()- Specified by:
isReadyin interfaceDrivenValue<T>- Returns:
- true if the driven value is ready to fetch
-
isDirty
public boolean isDirty()- Specified by:
isDirtyin interfaceDrivenValue<T>- Returns:
- true if the driven value has changed since the last time it was fetched
-
getAndClear
Description copied from interface:DrivenValueFetch the current driven value- Specified by:
getAndClearin interfaceDrivenValue<T>- Returns:
- An
Optionalcontaining the current driven value, if present, or an empty Optional if the driven value is null / not present.
-