Class AbstractNodePropertyManager
java.lang.Object
com.inductiveautomation.ignition.gateway.tags.evaluation.subscriptions.AbstractNodePropertyManager
- Direct Known Subclasses:
PropertySetNodeManager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A simple extension that holds the last changed value.static interface
Subclasses can add modifications to property descriptions through the property manager.protected class
This is a thin wrapper that implements Node and delegates calls to our enclosing class. -
Field Summary
FieldsModifier and TypeFieldDescription -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
browse
(List<NodeDescription> results, BrowseFilter filter, int startingOffset, AtomicInteger currentOffset) void
Disconnects all subscriptions.protected NodeDescription
createDescriptionFor
(Property<?> p) void
Fires a subscription change for each subscribed propertyvoid
fireSubscription
(Property<?> property) Fires a subscription change for the specified property.void
fireSubscription
(Property<?> prop, Supplier<QualifiedValue> valueSupplier) void
fireSubscription
(Property<?> prop, Supplier<QualifiedValue> valueSupplier, boolean fireToDefault) Fires a subscription for the given property.void
fireSubscriptionOnly
(Property<?> property) Fires a subscription change for specified property only.protected void
fireSubscriptionToTarget
(NodeSubscription target, QualifiedValue value) protected abstract Property<?>
protected abstract LoggerEx
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 Collection<? extends Property<?>>
These are the properties that are published for browsing.Returns threadsafe copy of the subscribed props.getSubscriptionMonitor
(Property<?> prop) protected NodeSubscription
protected boolean
Returns whether there is a valid listener for this property.void
readProperty
(Property<?> prop, 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, CompletableFuture<QualityCode> cf, SecurityContext security, Object value)
-
Field Details
-
descriptionModifiers
-
-
Constructor Details
-
AbstractNodePropertyManager
public AbstractNodePropertyManager()
-
-
Method Details
-
getLogger
-
getPropertyNode
This will generate a new node each time it's called. -
getSubscriptionMonitor
-
browse
public QualityCode browse(List<NodeDescription> results, BrowseFilter filter, int startingOffset, AtomicInteger currentOffset) -
getPublishedProperties
These are the properties that are published for browsing. -
createDescriptionFor
-
getDefaultSubscriptionProp
-
getPropertyValue
- Throws:
PropertyNotFoundException
- if the property is not a well known property and is not defined on the object.
-
getPropertyQualifiedValue
-
getSubscribedSet
Returns threadsafe copy of the subscribed props. -
readProperty
public void readProperty(Property<?> prop, CompletableFuture<QualifiedValue> cf, SecurityContext security) -
writeProperty
public <T> void writeProperty(Property<T> prop, CompletableFuture<QualityCode> cf, SecurityContext security, Object value) -
fireAllSubscriptions
public void fireAllSubscriptions()Fires a subscription change for each subscribed property -
fireSubscription
Fires a subscription change for the specified property. -
fireSubscriptionOnly
Fires a subscription change for specified property only. Will not fire extra events if property is null or default. -
addDescriptionModifier
-
getTarget
-
hasTarget
Returns whether there is a valid listener for this property. -
clearSubscriptions
public void clearSubscriptions()Disconnects all subscriptions. -
subscribe
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
-
fireSubscription
-
fireSubscription
public void fireSubscription(Property<?> prop, Supplier<QualifiedValue> valueSupplier, boolean fireToDefault) 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
-