Apama Documentation : Developing Apama Applications : Developing EPL Plug-ins : Writing EPL Plug-ins in C++ : Using plug-ins written in C++
Using plug-ins written in C++
The plug-in library you compiled must be available on the correlator's PATH (Windows) or LD_LIBRARY_PATH (Linux). By default, the $APAMA_WORK/lib directory is included on the appropriate path, and we recommend that you use this location for your own plug-ins.
Plug-ins are loaded using the import statement in EPL:
monitor m {
import "MyPlugin" as plugin;
}
This statement can be made at the top-level of either monitors or events.
The correlator then attempts to load MyPlugin.dll (Windows) or libMyPlugin.so (Linux) from the path. The correlator reads the list of exported methods from the plug-in. These methods are then available on the name provided in the as statement in the rest of that monitor or event:
event E {
import "MyPlugin" as plugin;
action increment(integer i) {
plugin.increment(i);
}
action get() returns integer {
return plugin.getCount();
}
}
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback