biz.onixs.fix.fast
Class Encoder

java.lang.Object
  extended by biz.onixs.fix.fast.Encoder

public class Encoder
extends Object

FIX-to-FAST Encoder.


Field Summary
protected  boolean codeEachMessageIndependently
           
protected  biz.onixs.fix.fast.DictionaryLibrary dictionaryLibrary
           
protected  FastVersion fastVersion
           
protected  Version fixVersion
           
protected  TemplateLibrary templateLibrary
           
 
Constructor Summary
Encoder(TemplateLibrary templateLibrary, Version fixVersion, FastVersion fastVersion)
          Constructor.
Encoder(TemplateLibrary templateLibrary, Version fixVersion, FastVersion fastVersion, boolean codeEachMessageIndependently)
          Constructor.
 
Method Summary
 byte[] encode(Message message, int templateId)
          Encodes the given FIX message into a FAST stream chunk.
protected  Dictionary getDictionary(Template template)
           
 FastVersion getFastVersion()
          Returns source FAST version.
 Version getFixVersion()
          Returns target FIX version.
 TemplateLibrary getTemplateLibrary()
          Returns associated template library.
 boolean isCodeEachMessageIndependently()
          Returns option to reset the previous values dictionaries before decoding a new FIX message.
 void reset()
          Resets the state of the previous values dictionaries (sets the state of the previous values to undefined).
 void setDecodeEachMessageIndependently(boolean codeEachMessageIndependently)
          Sets option to reset the previous values dictionaries before coding a new FIX message.
protected  void setDictionary(Template template, Dictionary dictionary)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

codeEachMessageIndependently

protected boolean codeEachMessageIndependently

templateLibrary

protected TemplateLibrary templateLibrary

fixVersion

protected Version fixVersion

fastVersion

protected FastVersion fastVersion

dictionaryLibrary

protected biz.onixs.fix.fast.DictionaryLibrary dictionaryLibrary
Constructor Detail

Encoder

public Encoder(TemplateLibrary templateLibrary,
               Version fixVersion,
               FastVersion fastVersion)
Constructor.

Parameters:
templateLibrary - template library to use
fixVersion - source FIX version
fastVersion - target FAST version

Encoder

public Encoder(TemplateLibrary templateLibrary,
               Version fixVersion,
               FastVersion fastVersion,
               boolean codeEachMessageIndependently)
Constructor.

Parameters:
templateLibrary - template library to use
fixVersion - source FIX version
fastVersion - target FAST version
codeEachMessageIndependently - option to reset the previous values dictionaries (default is true)
Method Detail

encode

public byte[] encode(Message message,
                     int templateId)
              throws FastException
Encodes the given FIX message into a FAST stream chunk.

Parameters:
message - input FIX message
templateId - template id to use
Returns:
encoded FAST stream chunk
Throws:
FastException - if encoding failed

toString

public String toString()
Overrides:
toString in class Object

isCodeEachMessageIndependently

public boolean isCodeEachMessageIndependently()
Returns option to reset the previous values dictionaries before decoding a new FIX message.

Returns:
option to reset the previous values dictionaries

setDecodeEachMessageIndependently

public void setDecodeEachMessageIndependently(boolean codeEachMessageIndependently)
Sets option to reset the previous values dictionaries before coding a new FIX message.

Parameters:
codeEachMessageIndependently - option to reset the previous values dictionaries

getTemplateLibrary

public TemplateLibrary getTemplateLibrary()
Returns associated template library.

Returns:
associated template library

getFastVersion

public FastVersion getFastVersion()
Returns source FAST version.

Returns:
source FAST version

getFixVersion

public Version getFixVersion()
Returns target FIX version.

Returns:
target FIX version

reset

public void reset()
Resets the state of the previous values dictionaries (sets the state of the previous values to undefined).


getDictionary

protected Dictionary getDictionary(Template template)

setDictionary

protected void setDictionary(Template template,
                             Dictionary dictionary)


Copyright © 2005-2012 Onix Solutions. All Rights Reserved.