To write implement a custom function extension, create a class extending "org.wso2.siddhi.core.executor.function.FunctionExecutor" , add the SiddhiExtionsion annotation, compile that and create an appropriate .siddhiext extension mapping file, compile the class, and add build the jar file containing the .class
and .siddhiext
files. Add them to the Siddhi class path <DAS_HOME>/repository/components/lib. Then add the fully-qualified class name for the implementation class in a new line, to the siddhi.extension file located at . In a scenario where they are run on WSO2 DAS add the jar to the <DAS_HOME>/repository/
confcomponents/
siddhidropins
directory.
For example, if you have created the extension with namespace custom and function name plus, you can use that in the query as follows:
...