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 sends events
 
A plug-in in Java that sends events
The SendPlugin.java file in the samples\correlator_plugin\java directory of your Apama installation is a sample plug-in that shows how to pass contexts around and how to send events to specific contexts.
The Java class for the plug-in imports com.apama.epl.plugin.Context and com.apama.epl.plugin.Correlator and it declares a public method that sends an event to a channel and another public method that sends an event to a particular context.
The SendPlugin.xml deployment descriptor file contains the name, class, and description of the plug-in in the <plugin> stanza.
The Apama application SendPlugin.mon first imports the plug-in and then calls the plug-in's sendEventToChannel() method as well as its sendEventTo() method with a variety of contexts.