Package io.siddhi.sample.util
Class CustomFunctionExtension
- java.lang.Object
-
- io.siddhi.core.executor.function.FunctionExecutor
-
- io.siddhi.sample.util.CustomFunctionExtension
-
- All Implemented Interfaces:
io.siddhi.core.executor.ExpressionExecutor,Serializable
public class CustomFunctionExtension extends io.siddhi.core.executor.function.FunctionExecutor- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CustomFunctionExtension()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Objectexecute(Object[] data, io.siddhi.core.util.snapshot.state.State state)The main execution method which will be called upon event arrival when there are more then one function parameterprotected Objectexecute(Object data, io.siddhi.core.util.snapshot.state.State state)The main execution method which will be called upon event arrival when there are zero or one function parameterio.siddhi.query.api.definition.Attribute.TypegetReturnType()protected io.siddhi.core.util.snapshot.state.StateFactoryinit(io.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors, io.siddhi.core.util.config.ConfigReader configReader, io.siddhi.core.config.SiddhiQueryContext siddhiQueryContext)The initialization method for FunctionExecutor, this method will be called before the other methods
-
-
-
Method Detail
-
init
protected io.siddhi.core.util.snapshot.state.StateFactory init(io.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors, io.siddhi.core.util.config.ConfigReader configReader, io.siddhi.core.config.SiddhiQueryContext siddhiQueryContext)The initialization method for FunctionExecutor, this method will be called before the other methods- Specified by:
initin classio.siddhi.core.executor.function.FunctionExecutor- Parameters:
attributeExpressionExecutors- are the executors of each function parametersconfigReader-siddhiQueryContext- the context of the siddhi query
-
execute
protected Object execute(Object[] data, io.siddhi.core.util.snapshot.state.State state)
The main execution method which will be called upon event arrival when there are more then one function parameter- Specified by:
executein classio.siddhi.core.executor.function.FunctionExecutor- Parameters:
data- the runtime values of function parametersstate-- Returns:
- the function result
-
execute
protected Object execute(Object data, io.siddhi.core.util.snapshot.state.State state)
The main execution method which will be called upon event arrival when there are zero or one function parameter- Specified by:
executein classio.siddhi.core.executor.function.FunctionExecutor- Parameters:
data- null if the function parameter count is zero or runtime data value of the function parameterstate- Function state- Returns:
- the function result
-
getReturnType
public io.siddhi.query.api.definition.Attribute.Type getReturnType()
-
-