Class ActionInvoker
- java.lang.Object
-
- com.floragunn.signals.watch.action.invokers.ActionInvoker
-
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent
- Direct Known Subclasses:
AlertAction,ResolveAction
public abstract class ActionInvoker extends Object implements org.elasticsearch.common.xcontent.ToXContent
-
-
Field Summary
Fields Modifier and Type Field Description protected List<Check>checksprotected InlinePainlessScript<SignalsObjectFunctionScript.Factory>foreachprotected intforeachLimitprotected ActionHandlerhandlerprotected Stringname
-
Constructor Summary
Constructors Modifier Constructor Description protectedActionInvoker(String name, ActionHandler handler, List<Check> checks, InlinePainlessScript<SignalsObjectFunctionScript.Factory> foreach, Integer foreachLimit)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static List<Check>createNestedChecks(WatchInitializationService watchInitService, com.floragunn.searchsupport.config.validation.ValidatingJsonNode vJsonNode, com.floragunn.searchsupport.config.validation.ValidationErrors validationErrors)ActionExecutionResultexecute(WatchExecutionContext ctx)List<Check>getChecks()InlinePainlessScript<SignalsObjectFunctionScript.Factory>getForeach()intgetForeachLimit()ActionHandlergetHandler()StringgetName()StringtoJson()StringtoString()
-
-
-
Field Detail
-
name
protected final String name
-
handler
protected final ActionHandler handler
-
foreach
protected final InlinePainlessScript<SignalsObjectFunctionScript.Factory> foreach
-
foreachLimit
protected final int foreachLimit
-
-
Constructor Detail
-
ActionInvoker
protected ActionInvoker(String name, ActionHandler handler, List<Check> checks, InlinePainlessScript<SignalsObjectFunctionScript.Factory> foreach, Integer foreachLimit)
-
-
Method Detail
-
getName
public String getName()
-
execute
public ActionExecutionResult execute(WatchExecutionContext ctx) throws ActionExecutionException
- Throws:
ActionExecutionException
-
toJson
public String toJson()
-
createNestedChecks
protected static List<Check> createNestedChecks(WatchInitializationService watchInitService, com.floragunn.searchsupport.config.validation.ValidatingJsonNode vJsonNode, com.floragunn.searchsupport.config.validation.ValidationErrors validationErrors)
-
getHandler
public ActionHandler getHandler()
-
getForeach
public InlinePainlessScript<SignalsObjectFunctionScript.Factory> getForeach()
-
getForeachLimit
public int getForeachLimit()
-
-