Apama Documentation : Connecting Apama Applications to External Components : Standard IAF Plug-ins : Codec IAF Plug-ins : The Fixed Width codec IAF plug-in : Encoding fixed width data from the correlator for the sink
Encoding fixed width data from the correlator for the sink
Encoding fixed width data works in the exact opposite way to decoding. The semantic mapper calls:
public void sendNormalisedEvent(NormalisedEvent event,
      TimestampSet timestamps)
   throws CodecException, TransportException
This method retrieves the data associated with the data key. The data is in a string sequence where each member contains the value of a field. The method encodes the sequence members into a single line to send to the transport so the transport can write the data to the sink. Finally, the method stores the result of the encoding in the data field again.
If the event contains a sessionId value, this is the configuration that the codec uses to encode the data. If the event does not contain a sessionId, the codec uses the default File adapter configuration as specified in the File adapter configuration file initially used to start the file adapter.
For a given event mapping in the IAF configuration file, it is not possible to dynamically specify the event decoder property, which identifies the codec that sends the event to the transport. Consequently, an adapter that is using several different codecs is unable to receive the same type of event from each codec. If it is necessary for your adapter to receive the same type of event from multiple codecs, set the event decoder property to the Null codec. This lets the transport receive the event and subsequently reroute the event back to the Fixed Width codec by calling the following method:
sendNormalisedEvent(NormalisedEvent event, TimestampSet timestamps)
The Fixed Width codec then returns the encoded data to the transport.
Copyright © 2013-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback