public abstract class AbstractTokenChangeGenerator<T extends Token<T>,E extends TokenEvent<T>> extends Object implements ChangeGenerator<E>
Constructor and Description |
---|
AbstractTokenChangeGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener<E> changeListener)
Allow Notify all
ChangeListener s about a change |
List<ChangeListener<E>> |
getListeners()
Get list directly.
|
org.apache.commons.collections.Transformer |
getTrackChange()
|
void |
notifyAllListeners(E event)
Notify all listeners with updates to
TokenEvent . |
void |
setListeners(List<ChangeListener<E>> listeners)
Set list directly.
|
void |
setTrackChange(org.apache.commons.collections.Transformer trackChange)
|
void |
trackChange(Object tokens) |
void |
trackChange(Supplier<T> tokens) |
public void addChangeListener(ChangeListener<E> changeListener)
ChangeGenerator
ChangeListener
s about a changeaddChangeListener
in interface ChangeGenerator<E extends TokenEvent<T>>
public List<ChangeListener<E>> getListeners()
ChangeGenerator
getListeners
in interface ChangeGenerator<E extends TokenEvent<T>>
public void setListeners(List<ChangeListener<E>> listeners)
ChangeGenerator
setListeners
in interface ChangeGenerator<E extends TokenEvent<T>>
listeners
- the listeners to setpublic void notifyAllListeners(E event)
TokenEvent
.
TokenEvent
is of type SupplierTokenEvent
and was not Consumable.wasConsumed()
then
Some actions maybe in Supplier SupplierTokenEvent.getTokens()
,
so execute them nevertheless by default incase there.notifyAllListeners
in interface ChangeGenerator<E extends TokenEvent<T>>
DefaultAbstractTokenContainerService#notifyAllListeners(java.util.function.Supplier, FlowStatus, Consumer)
public void trackChange(Object tokens)
tokens
- as Token
or Collection
of Token
spublic org.apache.commons.collections.Transformer getTrackChange()
for example
EXPECTED TO BE SET TO A BEAN VIA SPRING
public void setTrackChange(org.apache.commons.collections.Transformer trackChange)
for example
EXPECTED TO BE SET TO A BEAN VIA SPRING
Copyright © 2018. All rights reserved.