All Known Subinterfaces:
AlarmEvaluator, BrowsableNode
All Known Implementing Classes:
AbstractNodePropertyManager.PropertyNode

public interface Node
The "Node" is the base unit of everything in the tag system. It fundamentally represents an item with a value, that supports read, write, and subscribe calls.
  • Method Details

    • setSubscription

      void setSubscription(@Nullable NodeSubscription subscription)
      Set by the subscription system, this is the connector between the node and all other subscriptions. Value changes should be sent through the QualifiedValueListener#valueChanged call. When the node knows that it is being unloaded, deleted, or otherwise made irrelevant, it must call disconnectNode on the subscription to notify the listeners that the node is disappearing.
    • setLeased

      void setLeased(boolean value)
      This is called by the subscription system to indicate that there is at least one "heavy-weight" listener for the node. A heavy-weight listener is one that cares about receiving all value updates for the purposes of actual data processing, as opposed to other listeners that care about the value, but don't want to trigger heavy execution unnecessarily. For example, the nodes of the tag browse tree will display values, but should not trigger heavier "leased" based execution. In many cases, the exact nature of what this means depends on the tag group or other settings on the node.
    • write

      default void write(CompletableFuture<QualityCode> cf, SecurityContext security, Object value, Optional<SubIndex> subIndex)
      If the node supports writing, it should override this function. Make sure to complete the CompletableFuture when the write is finished.
      Parameters:
      cf - The passed CompletableFuture will be completed when the write is complete
      security - A SecurityContext that is used to restrict tag write access as needed
      value - The object that is to be written to the tag
      subIndex - If set to a non-null value, this will let the underlying system know where to set the value in a complex data type.
    • read

      default void read(CompletableFuture<QualifiedValue> cf, SecurityContext security, Optional<SubIndex> subIndex)
      If the node supports manual reading, it should override this function. Make sure to complete the CompletableFuture when the read is finished.
      Parameters:
      cf - The passed CompletableFuture will be completed when the read is complete
      security - A SecurityContext that is used to restrict tag read access as needed
      subIndex - If set to a non-null value, this will extract a sub value from a complex data node.