Class ElementBindingHarness
- java.lang.Object
-
- com.inductiveautomation.perspective.gateway.model.AbstractBindingHarness
-
- com.inductiveautomation.perspective.gateway.model.ElementBindingHarness
-
- All Implemented Interfaces:
AuditingContext,BindingContext,LoggingContext
public class ElementBindingHarness extends AbstractBindingHarness
-
-
Field Summary
-
Fields inherited from class com.inductiveautomation.perspective.gateway.model.AbstractBindingHarness
binding, shutdown, targetComponent, targetProperty, transforms, typeCode
-
-
Constructor Summary
Constructors Constructor Description ElementBindingHarness(PerspectiveElement targetComponent, PropertyKey target, BindingConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BindingCollection.BindingHarnessMakernewFactory(PerspectiveElement element)protected java.lang.RunnablesubscribeToTarget(java.util.function.Consumer<PropertyTreeChangeEvent> callback)Attempt to subscribe to the target property.java.lang.StringtoString()protected voidwriteToTarget(QualifiedValue value)Write the given value to the target property.-
Methods inherited from class com.inductiveautomation.perspective.gateway.model.AbstractBindingHarness
getAuditSnapshot, getLastValue, getLogger, getMdcParent, getTargetElement, getTargetProperty, mdcSetup, mdcTeardown, onBindingProducedValue, onTransformProducedValue, processPublishedValue, publish, refresh, shutdown, startup
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.AuditingContext
audit
-
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.BindingContext
getAuditProfile, getExecutorService, getScheduler, getSession, publish
-
Methods inherited from interface com.inductiveautomation.perspective.gateway.api.LoggingContext
mdc, mdcSetupTree, mdcTeardownTree, mdcWrap
-
-
-
-
Constructor Detail
-
ElementBindingHarness
public ElementBindingHarness(PerspectiveElement targetComponent, PropertyKey target, BindingConfig config)
-
-
Method Detail
-
newFactory
public static BindingCollection.BindingHarnessMaker newFactory(PerspectiveElement element)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
subscribeToTarget
@Nullable protected java.lang.Runnable subscribeToTarget(java.util.function.Consumer<PropertyTreeChangeEvent> callback)
Description copied from class:AbstractBindingHarnessAttempt to subscribe to the target property.- Specified by:
subscribeToTargetin classAbstractBindingHarness- Parameters:
callback- When the target property changes, call this consumer and give it a way to fetch the new value- Returns:
- A runnable which when called will tear down the subscription. May be null if the subscription wasn't able to be established.
-
writeToTarget
protected void writeToTarget(QualifiedValue value)
Description copied from class:AbstractBindingHarnessWrite the given value to the target property.- Specified by:
writeToTargetin classAbstractBindingHarness
-
-