You can write Siddhi extensions and run them in WSO2 CEP as given : https://docs.wso2.com/display/CEP310/Writing+Extensions+to+Siddhi
But if you are using Siddhi as a Java library then you can add then to SiddhiManager as follows
List extensionClasses = new ArrayList();
SiddhiManager siddhiManager = new SiddhiManager( siddhiConfiguration);
But if you are using Siddhi as a Java library then you can add then to SiddhiManager as follows
List
extensionClasses.add(org.wso2. siddhi.core.query.processor. window. UniqueWindowProcessorExt. class);
SiddhiConfiguration siddhiConfiguration = new SiddhiConfiguration();
siddhiConfiguration. setSiddhiExtensions( extensionClasses);