Developing Apama Applications > Developing Adapters > Java Codec Plug-in Development > Getting started with Java codec layer plug-in development
Getting started with Java codec layer plug-in development
Your distribution includes a complete ‘skeleton’ implementation of a codec layer plug-in in order to make development of new plug-ins faster.
This is located in the samples\iaf_plugin\java\skeleton\src directory of the installation, in a file called SkeletonCodec.java. The SkeletonCodec class complies fully with the Codec Plug-in Development Specification, but contains none of the custom encoding and decoding functionality that would be present in a full codec plug-in.
The code contains TODO: comments indicating the main changes that need to be made to develop a useful plug-in. These include:
*Adding code to sendTransportEvent to decode a message received from the transport layer into a normalized event (if supported).
*Adding code to sendNormalisedEvent to encode a message received from the Semantic Mapper transport into a message that can be sent on by the transport layer (if supported).
*Adding code to validate and save any new plug-in properties that are to be supported, in updateProperties.
*Adding code to initialize and clean up resources associated with the plug-in’s operation. This would usually be done in the updateProperties and cleanup methods.
Depending on your requirements, it may also be necessary to make changes to the other main methods – addEventTransport, removeEventTransport, flushUpstream, flushDownstream, getStatus, and the constructor.
The skeleton directory includes an Apache Ant build file called build.xml that provides a convenient way to build .jar files of compiled classes from plug-in source files, ready for use with the IAF.
Copyright © 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.