Connecting Apama Applications to External Components > Using Standard Adapters > Using Adapter Plug-ins > The Filter Codec plug-in
The Filter Codec plug-in
The Apama filter codec plug-ins filter normalized event fields. You can use the filter codec to:
*Route upstream events to particular transports
*Remove particular fields from upstream and/or downstream events
To use the filter codec, the FilterCodec or JFilterCodec library must be available to the IAF at runtime. These are the filenames of the C++ and Java libraries that implements the plug-in.
In order to load this plug-in, the <codec> element in the adapter’s configuration file needs to load either the FilterCodec or JFilterCodec library. Note that for the Java version, the full path to the plug-in’s .jar file needs to be specified.
A configuration file for C/C++ uses this:
<codec name="FilterCodec" library="FilterCodec">
In a configuration file for Java:
<codec name="JFilterCodec"
   jarName="Apama_install_dir\lib\JFilterCodec.jar"            
className="com.apama.iaf.codec.filtercodec.JFilterCodec">
To configure the filter codec, add the following to the <codecs> section of the IAF configuration file:
<codec name="FilterCodec" library="FilterCodec">
  <property name="transportFieldName" value="transport_field_name"/>
  <property name="filter_spec_1" value="filter_condition_1"/>
  <property name="filter_spec_2" value="filter_condition_2"/>
...
  <property name="filter_spec_n" value="filter_condition_n"/>
</codec>
Details for replacing the variables in the above codec section are in the following topics:
*Filter codec transport-related properties
*Specifying filters for the filter codec
*Examples of filter specifications.
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.