Class AbstractFilterWrapper<T>

java.lang.Object
com.fluxtion.ext.streaming.api.stream.AbstractFilterWrapper<T>
Type Parameters:
T -
All Implemented Interfaces:
FilterWrapper<T>, Stateful<T>, Test, Wrapper<T>
Direct Known Subclasses:
DefaultNumberWrapper

public abstract class AbstractFilterWrapper<T>
extends java.lang.Object
implements FilterWrapper<T>
A base class for stream functions.
Author:
V12 Technology Ltd.
  • Field Details

  • Constructor Details

  • Method Details

    • publishAndReset

      public FilterWrapper<T> publishAndReset​(java.lang.Object notifier)
      Description copied from interface: Wrapper
      Publishes the current value to all child dependencies and then resets. After all children have processed the trigger a reset is invoked on the wrapped instance. The publish and reset is triggered when the supplied notifier triggers in the execution graph.
      Specified by:
      publishAndReset in interface Wrapper<T>
      Parameters:
      notifier - trigger for publish and reset
      Returns:
    • resetAndPublish

      public FilterWrapper<T> resetAndPublish​(java.lang.Object notifier)
      Description copied from interface: Wrapper
      Resets the stateful node and publishes the current value by notifying child nodes. The reset is before the notification is broadcast. The reset and publish is triggered when the supplied notifier triggers in the execution graph.
      Specified by:
      resetAndPublish in interface Wrapper<T>
      Parameters:
      notifier - trigger for reset and publish
      Returns:
    • resetNoPublish

      public FilterWrapper<T> resetNoPublish​(java.lang.Object notifier)
      Description copied from interface: Wrapper
      Resets the current value without notifying children of a change. The reset is triggered when the supplied notifier triggers in the execution graph.
      Specified by:
      resetNoPublish in interface Wrapper<T>
      Parameters:
      notifier - trigger for reset
      Returns:
    • publishThenResehNotification

      public void publishThenResehNotification​(java.lang.Object publishThenResetNotifier)
    • resetThenPublishNotification

      public void resetThenPublishNotification​(java.lang.Object resetThenPublishNotifier)
    • resetNoPublishNotification

      public void resetNoPublishNotification​(java.lang.Object resetNoPublishNotifier)
    • notifyOnChange

      public FilterWrapper<T> notifyOnChange​(boolean notifyOnChange)
      Description copied from interface: Wrapper
      Controls the notification policy of event notification to child nodes for this stream node. The default policy is to invoke child nodes when the return of the parent event method is true. NotifyOnChange notifies the child only when the parent node return of the previous cycle is false and this one is true.

      This can be useful if a single notification of a breach is required and subsequent continued breaches are swallowed, for example this can prevent logging spamming when combined with filters.

      Specified by:
      notifyOnChange in interface FilterWrapper<T>
      Specified by:
      notifyOnChange in interface Wrapper<T>
      Parameters:
      notifyOnChange - false = notify always. true = notify on change only
      Returns:
      The current node
    • validOnStart

      public FilterWrapper<T> validOnStart​(boolean validOnStart)
      Description copied from interface: Wrapper
      Set this property to signal the wrapper has a valid value and child nodes do not have to wait for a trigger notification before using the data from this instance.
      Specified by:
      validOnStart in interface FilterWrapper<T>
      Specified by:
      validOnStart in interface Wrapper<T>
      Returns:
    • isNotifyOnChangeOnly

      public boolean isNotifyOnChangeOnly()
    • setNotifyOnChangeOnly

      public void setNotifyOnChangeOnly​(boolean notifyOnChangeOnly)
    • isValidOnStart

      public boolean isValidOnStart()
      Specified by:
      isValidOnStart in interface Wrapper<T>
    • setValidOnStart

      public void setValidOnStart​(boolean validOnStart)
    • passed

      public boolean passed()
      Specified by:
      passed in interface Test