Class AbstractNodePropertyManager

  • Direct Known Subclasses:
    PropertySetNodeManager

    public abstract class AbstractNodePropertyManager
    extends java.lang.Object
    • Constructor Detail

      • AbstractNodePropertyManager

        public AbstractNodePropertyManager()
    • Method Detail

      • getPropertyNode

        public Node getPropertyNode​(Property<?> prop)
        This will generate a new node each time it's called.
      • getPublishedProperties

        protected abstract java.util.Collection<? extends Property<?>> getPublishedProperties()
        These are the properties that are published for browsing.
      • getDefaultSubscriptionProp

        protected abstract Property<?> getDefaultSubscriptionProp()
      • getSubscribedSet

        protected java.util.Set<Property<?>> getSubscribedSet()
        Returns threadsafe copy of the subscribed props.
      • 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.
      • 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.