public class BasicTokenEvent<T extends Token<T>> extends Status implements SingleTokenEvent<T>, MultipleTokenEvent<T>, SupplierTokenEvent<T>
Token type.AddOnBehavior,
Serialized FormTokenEvent.ContainerEventType, TokenEvent.TokenEventFlowStatus, TokenEvent.TokenEventType| Constructor and Description |
|---|
BasicTokenEvent() |
BasicTokenEvent(BasicTokenEvent tokenEvent) |
BasicTokenEvent(String json) |
BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus) |
BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus,
Collection<T> tokens) |
BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus,
Supplier<Collection<T>> tokensSupplier) |
BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus,
T token) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBehavior(Behavior behavior) |
void |
consumed()
Set the state to consumed.
Note there maybe other getters on the bean/state that can internally set this. |
Map<Class,Behavior> |
getBehaviors()
Optional
AddOnBehaviors for custom strategies |
Feedback |
getFeedback()
Any
SynchronousChange related Feedback |
TokenEvent.TokenEventFlowStatus |
getFlowStatus()
The
FlowStatus type of the event itself |
Consumer |
getPreEventProcess()
When tokens are assigned to this Event, then pre-action on tokens before the event is processed.
|
T |
getToken() |
Collection<T> |
getTokens() |
void |
setBehaviors(Map<Class,Behavior> behaviors)
Optional
AddOnBehaviors for custom strategies |
void |
setFeedback(Feedback feedback)
Any
SynchronousChange related Feedback |
void |
setFlowStatus(TokenEvent.TokenEventFlowStatus flowStatus)
The
FlowStatus type of the event itself |
void |
setToken(T token) |
void |
setTokens(Collection<T> tokens) |
void |
setTokens(Supplier<Collection<T>> tokensSupplier) |
String |
toString() |
boolean |
wasConsumed()
Maintain state if token(s) were accessed or not.
|
getLevel, getMessage, setLevel, setMessagepublic BasicTokenEvent()
public BasicTokenEvent(BasicTokenEvent tokenEvent)
public BasicTokenEvent(String json)
public BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus)
public BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus, T token)
public BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus, Collection<T> tokens)
public BasicTokenEvent(TokenEvent.TokenEventFlowStatus flowStatus, Supplier<Collection<T>> tokensSupplier)
public T getToken()
getToken in interface SingleTokenEvent<T extends Token<T>>public void setToken(T token)
setToken in interface SingleTokenEvent<T extends Token<T>>public Collection<T> getTokens()
getTokens in interface MultipleTokenEvent<T extends Token<T>>getTokens in interface SupplierTokenEvent<T extends Token<T>>public void setTokens(Collection<T> tokens)
tokens - the tokens to setpublic void setTokens(Supplier<Collection<T>> tokensSupplier)
public TokenEvent.TokenEventFlowStatus getFlowStatus()
FlowStatus type of the event itselfgetFlowStatus in interface FlowStatusChangegetFlowStatus in interface TokenEvent<T extends Token<T>>TokenEventFlowStatuspublic void setFlowStatus(TokenEvent.TokenEventFlowStatus flowStatus)
FlowStatus type of the event itselfsetFlowStatus in interface TokenEvent<T extends Token<T>>TokenEventFlowStatuspublic boolean wasConsumed()
wasConsumed in interface Consumablepublic void consumed()
Consumableconsumed in interface Consumablepublic Feedback getFeedback()
SynchronousChange related FeedbackgetFeedback in interface SynchronousChange<Feedback>getFeedback in interface TokenEvent<T extends Token<T>>public void setFeedback(Feedback feedback)
SynchronousChange related FeedbacksetFeedback in interface SynchronousChange<Feedback>public Consumer getPreEventProcess()
Consumer or Function.
token.getPreEventProcess in interface TokenEvent<T extends Token<T>>public Map<Class,Behavior> getBehaviors()
AddOnBehaviors for custom strategiesgetBehaviors in interface BehaviorsgetBehaviors in interface TokenEvent<T extends Token<T>>public void setBehaviors(Map<Class,Behavior> behaviors)
AddOnBehaviors for custom strategiessetBehaviors in interface BehaviorssetBehaviors in interface TokenEvent<T extends Token<T>>public void addBehavior(Behavior behavior)
addBehavior in interface BehaviorsaddBehavior in interface TokenEvent<T extends Token<T>>TokenEvent.getBehaviors()Copyright © 2018. All rights reserved.