Class ElseWrapper<T>

java.lang.Object
com.fluxtion.ext.streaming.api.stream.ElseWrapper<T>
Type Parameters:
T -
All Implemented Interfaces:
Stateful<T>, Wrapper<T>

public class ElseWrapper<T>
extends java.lang.Object
implements Wrapper<T>
Wraps a Wrapper and provides an else execution path. This is useful when wrapping a filtering node.
Author:
Greg Higgins [email protected]
  • Constructor Details

  • Method Details

    • filterUpdated

      public void filterUpdated​(FilterWrapper filter)
    • onEvent

      public boolean onEvent()
    • isNotifyOnChangeOnly

      public boolean isNotifyOnChangeOnly()
    • setNotifyOnChangeOnly

      public void setNotifyOnChangeOnly​(boolean notifyOnChangeOnly)
    • notifyOnChange

      public Wrapper<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 Wrapper<T>
      Parameters:
      notifyOnChange - false = notify always. true = notify on change only
      Returns:
      The current node
    • event

      public T event()
      Description copied from interface: Wrapper
      The wrapped node
      Specified by:
      event in interface Wrapper<T>
      Returns:
      the wrapped node
    • eventClass

      public java.lang.Class<T> eventClass()
      Description copied from interface: Wrapper
      The type of the wrapped node
      Specified by:
      eventClass in interface Wrapper<T>
      Returns:
      wrapped node class