Interface Node

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default void read​(java.util.concurrent.CompletableFuture<QualifiedValue> cf, SecurityContext security, java.util.Optional<ArrayIndex> arrayIndex)
      If the node supports manual reading, it should override this function.
      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.
      void setSubscription​(NodeSubscription subscription)
      Set by the subscription system, this is the connector between the node and all other subscriptions.
      default void write​(java.util.concurrent.CompletableFuture<QualityCode> cf, SecurityContext security, java.lang.Object value, java.util.Optional<ArrayIndex> arrayIndex)
      If the node supports writing, it should override this function.
    • Method Detail

      • setSubscription

        void setSubscription​(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 vaue, 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​(java.util.concurrent.CompletableFuture<QualityCode> cf,
                           SecurityContext security,
                           java.lang.Object value,
                           java.util.Optional<ArrayIndex> arrayIndex)
        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
        arrayIndex - If set to a non-null value, this will let the underlying system know where to set the passed value in an array.
      • read

        default void read​(java.util.concurrent.CompletableFuture<QualifiedValue> cf,
                          SecurityContext security,
                          java.util.Optional<ArrayIndex> arrayIndex)
        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
        arrayIndex - If set to a non-null value, this will let the underlying system know where to set the passed value in an array.