Apama 10.15.0 | Developing Apama Applications | Developing EPL Plug-ins | Writing EPL Plug-ins in Java | Sample EPL plug-ins written in Java | A plug-in in Java that subscribes to receive events
 
A plug-in in Java that subscribes to receive events
The SubscribePlugin.java file in the samples\correlator_plugin\java directory of your Apama installation is a sample that shows how a plug-in subscribes to receive events sent on a particular channel.
The Java code for the SubscribePlugin class contains the public static createHandler method. (Methods that will be called from EPL code need to be public and static.)
The deployment descriptor file SubscribePlugin.xml contains the <plugin> stanza that illustrates how to specify the plug-in.
The EPL code in the file SubscribePlugin.mon imports the plug-in and calls the createHandler() method.