Developing Apama Applications > Developing Correlator Plug-ins > Writing Correlator Plug-ins in Java > Sample plug-ins 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. This sample is comparable to the similar C and C++ subscription plug-in samples.
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.
Copyright © 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.