The Null Codec plug-in
The NullCodec/JNullCodec codec layer plug-ins are very useful in situations where it does not make sense to decouple the transport and codec layers. The transport layer plug-in might be best placed to perform all the necessary encoding and/or decoding of events, and to supply and receive Apama normalised events, rather than custom transport-specific messages.
The Null Codec plug-in is provided to make it easy to develop such transport plug-ins. This is a trivial codec layer plug-in that passes downstream normalised events from the transport layer to the Semantic Mapper, and upstream normalised events from the Semantic Mapper to the transport layer with no modification.
In order to load this plug-in, the <codec> element in the adapter’s configuration file needs to load the NullCodec or JNullCodec library (this represents the filename of the library that implements the plug-in). 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="NullCodec" library="NullCodec">
In a configuration file for Java:
<codec name="JNullCodec"
jarName="Apama_install_dir\lib\JNullCodec.jar" className="com.apama.iaf.codec.nullcodec.JNullCodec">
Note: The NullCodec and JNullCodec plug-ins can only be used with transport plug-ins that understand NormalisedEvent objects. The Null Codec plug-ins expect downstream NormalisedEvent objects from the transport and pass upstream NormalisedEvent objects it receives directly to the transport plug-in. Using the Null Codec plug-ins with a transport that expects any other kind of object does not work and can possibly crash the adapter.
Copyright © 2013
Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.