Class CustomFunctionExtension

  • All Implemented Interfaces:
    io.siddhi.core.executor.ExpressionExecutor, Serializable

    public class CustomFunctionExtension
    extends io.siddhi.core.executor.function.FunctionExecutor
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class io.siddhi.core.executor.function.FunctionExecutor

        attributeExpressionExecutors, functionId, processingMode, siddhiQueryContext
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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
      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
      io.siddhi.query.api.definition.Attribute.Type getReturnType()  
      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
      • Methods inherited from class io.siddhi.core.executor.function.FunctionExecutor

        execute, execute, execute, initExecutor
    • Constructor Detail

      • CustomFunctionExtension

        public CustomFunctionExtension()
    • 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:
        init in class io.siddhi.core.executor.function.FunctionExecutor
        Parameters:
        attributeExpressionExecutors - are the executors of each function parameters
        configReader -
        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:
        execute in class io.siddhi.core.executor.function.FunctionExecutor
        Parameters:
        data - the runtime values of function parameters
        state -
        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:
        execute in class io.siddhi.core.executor.function.FunctionExecutor
        Parameters:
        data - null if the function parameter count is zero or runtime data value of the function parameter
        state - Function state
        Returns:
        the function result
      • getReturnType

        public io.siddhi.query.api.definition.Attribute.Type getReturnType()