Class ElseWrapper<T>
java.lang.Object
com.fluxtion.ext.streaming.api.stream.ElseWrapper<T>
- Type Parameters:
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]
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.fluxtion.ext.streaming.api.Stateful
Stateful.StatefulNumber<S>
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ElseWrapper(FilterWrapper<T> node)
-
Method Summary
Modifier and Type Method Description T
event()
The wrapped nodejava.lang.Class<T>
eventClass()
The type of the wrapped nodevoid
filterUpdated(FilterWrapper filter)
boolean
isNotifyOnChangeOnly()
Wrapper<T>
notifyOnChange(boolean notifyOnChange)
Controls the notification policy of event notification to child nodes for this stream node.boolean
onEvent()
void
setNotifyOnChangeOnly(boolean notifyOnChangeOnly)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fluxtion.ext.streaming.api.Stateful
combine, deduct, setBucketCount
Methods inherited from interface com.fluxtion.ext.streaming.api.Wrapper
arg, arg, collect, console, defaultVal, filter, filter, forEach, forEach, get, group, group, id, isValidOnStart, map, map, map, map, map, map, map, map, map, map, notiferMerge, notifierOverride, publishAndReset, push, push, reset, resetAndPublish, resetNoPublish, validOnStart
-
Constructor Details
-
Method Details
-
filterUpdated
-
onEvent
public boolean onEvent() -
isNotifyOnChangeOnly
public boolean isNotifyOnChangeOnly() -
setNotifyOnChangeOnly
public void setNotifyOnChangeOnly(boolean notifyOnChangeOnly) -
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 interfaceWrapper<T>
- Parameters:
notifyOnChange
- false = notify always. true = notify on change only- Returns:
- The current node
-
event
Description copied from interface:Wrapper
The wrapped node -
eventClass
Description copied from interface:Wrapper
The type of the wrapped node- Specified by:
eventClass
in interfaceWrapper<T>
- Returns:
- wrapped node class
-