Class AbstractNodePropertyManager
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.tags.evaluation.subscriptions.AbstractNodePropertyManager
-
- Direct Known Subclasses:
PropertySetNodeManager
public abstract class AbstractNodePropertyManager extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
AbstractNodePropertyManager.ChangeTrackingNodeSubscription
A simple extension that holds the last changed value.protected class
AbstractNodePropertyManager.PropertyNode
-
Constructor Summary
Constructors Constructor Description AbstractNodePropertyManager()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description QualityCode
browse(java.util.List<NodeDescription> results, BrowseFilter filter, int startingOffset, java.util.concurrent.atomic.AtomicInteger currentOffset)
void
clearSubscriptions()
Disconnects all subscriptions.protected NodeDescription
createDescriptionFor(Property<?> p)
void
fireAllSubscriptions()
Fires a subscription change for each subscribed propertyvoid
fireSubscription(Property<?> property)
Fires a subscription change for the specified property.void
fireSubscription(Property<?> prop, java.util.function.Supplier<QualifiedValue> valueSupplier)
Fires a subscription for the given property.protected void
fireSubscriptionToTarget(NodeSubscription target, QualifiedValue value)
protected abstract Property<?>
getDefaultSubscriptionProp()
protected abstract LoggerEx
getLogger()
Node
getPropertyNode(Property<?> prop)
This will generate a new node each time it's called.protected QualifiedValue
getPropertyQualifiedValue(Property<?> prop)
protected abstract <T> T
getPropertyValue(Property<T> prop)
protected abstract java.util.Collection<? extends Property<?>>
getPublishedProperties()
These are the properties that are published for browsing.protected java.util.Set<Property<?>>
getSubscribedSet()
Returns threadsafe copy of the subscribed props.protected NodeSubscription
getTarget(Property<?> property)
protected boolean
hasTarget(Property<?> prop)
Returns whether there is a valid listener for this property.void
readProperty(Property<?> prop, java.util.concurrent.CompletableFuture<QualifiedValue> cf, SecurityContext security)
void
subscribe(Property<?> prop, NodeSubscription sub)
Subscribes to the specified property.void
unsubscribe(Property<?> prop)
<T> void
writeProperty(Property<T> prop, java.util.concurrent.CompletableFuture<QualityCode> cf, SecurityContext security, java.lang.Object value)
-
-
-
Method Detail
-
getLogger
protected abstract LoggerEx getLogger()
-
getPropertyNode
public Node getPropertyNode(Property<?> prop)
This will generate a new node each time it's called.
-
browse
public QualityCode browse(java.util.List<NodeDescription> results, BrowseFilter filter, int startingOffset, java.util.concurrent.atomic.AtomicInteger currentOffset)
-
getPublishedProperties
protected abstract java.util.Collection<? extends Property<?>> getPublishedProperties()
These are the properties that are published for browsing.
-
createDescriptionFor
protected NodeDescription createDescriptionFor(Property<?> p)
-
getDefaultSubscriptionProp
protected abstract Property<?> getDefaultSubscriptionProp()
-
getPropertyValue
protected abstract <T> T getPropertyValue(Property<T> prop) throws PropertyNotFoundException
- Throws:
PropertyNotFoundException
- if the property is not a well known property and is not defined on the object.
-
getPropertyQualifiedValue
protected QualifiedValue getPropertyQualifiedValue(Property<?> prop)
-
getSubscribedSet
protected java.util.Set<Property<?>> getSubscribedSet()
Returns threadsafe copy of the subscribed props.
-
readProperty
public void readProperty(Property<?> prop, java.util.concurrent.CompletableFuture<QualifiedValue> cf, SecurityContext security)
-
writeProperty
public <T> void writeProperty(Property<T> prop, java.util.concurrent.CompletableFuture<QualityCode> cf, SecurityContext security, java.lang.Object value)
-
fireAllSubscriptions
public void fireAllSubscriptions()
Fires a subscription change for each subscribed property
-
fireSubscription
public void fireSubscription(Property<?> property)
Fires a subscription change for the specified property.
-
getTarget
protected NodeSubscription getTarget(Property<?> property)
-
hasTarget
protected boolean hasTarget(Property<?> prop)
Returns whether there is a valid listener for this property.
-
clearSubscriptions
public void clearSubscriptions()
Disconnects all subscriptions.
-
subscribe
public void subscribe(Property<?> prop, NodeSubscription sub)
Subscribes to the specified property. If prop == null, it will be the default property of the node. Important point: we track "default null" separately from an actual property value for default. This is because the subscription system doesn't know what our default is. This also means that if the default prop is "Value", subscribing to "Tag.Value" is heavier than just "Tag".
-
unsubscribe
public void unsubscribe(Property<?> prop)
-
fireSubscription
public void fireSubscription(Property<?> prop, java.util.function.Supplier<QualifiedValue> valueSupplier)
Fires a subscription for the given property. If prop is null or is the default prop, events will be fired symmetrically for both "null" and "default" targets.
-
fireSubscriptionToTarget
protected void fireSubscriptionToTarget(NodeSubscription target, QualifiedValue value)
-
-