Constructor and Description |
---|
ExecutionTrigger(String name,
Expression expression,
Action action) |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(long current)
Based on current value, returns true if trigger is applied else false.
|
Trigger |
clone()
Return cloned copy of this trigger
|
boolean |
equals(Object other) |
static ExecutionTrigger |
fromWMTrigger(WMTrigger trigger) |
Action |
getAction()
Return the action that will get executed when trigger expression evaluates to true
|
Expression |
getExpression()
Get trigger expression
|
String |
getName()
Return the name of the trigger
|
String |
getViolationMsg()
Get error message set during trigger violation.
|
int |
hashCode() |
void |
setViolationMsg(String violationMsg)
Set trigger violation message.
|
String |
toString() |
public ExecutionTrigger(String name, Expression expression, Action action)
public String getName()
Trigger
public Expression getExpression()
Trigger
getExpression
in interface Trigger
public Action getAction()
Trigger
public Trigger clone()
Trigger
public String getViolationMsg()
Trigger
getViolationMsg
in interface Trigger
public void setViolationMsg(String violationMsg)
Trigger
Trigger.apply(long)
returns false, this can be used
to set message for trigger violation which will be sent as response to clients.setViolationMsg
in interface Trigger
violationMsg
- violation messagepublic boolean apply(long current)
Trigger
public static ExecutionTrigger fromWMTrigger(WMTrigger trigger)
Copyright © 2022 The Apache Software Foundation. All rights reserved.