org.marketcetera.ors.filters
Class FieldDuplicatorMessageModifier

java.lang.Object
  extended by org.marketcetera.ors.filters.FieldDuplicatorMessageModifier
All Implemented Interfaces:
MessageModifier

public class FieldDuplicatorMessageModifier
extends Object
implements MessageModifier

Copies the string value of one field to another. Will only copy the source field if it's present. This examples copies Symbol (55) to SecurityID (48):

  <bean id="fieldDuplicator" class="org.marketcetera.quickfix.messagemodifiers.FieldDuplicatorMessageModifier">
      <constructor-arg>55</constructor-arg>
      <constructor-arg>48</constructor-arg>
  </bean>
 
Add the modifier to the list of other message modifiers in the OutgoingMessageHandler bean in ors-shared.xml:
  <bean id="outgoingMessageHandler" class="org.marketcetera.ors.OutgoingMessageHandler" scope="prototype">
  ...
      <property name="orderModifiers">
          <list>
              <ref bean="defaultOrderModifier"/>
              <ref bean="fieldDuplicator"/>
          </list>
      </property>
  ...
 

Version:
$Id: FieldDuplicatorMessageModifier.java 16154 2012-07-14 16:34:05Z colin $
Author:
toli

Constructor Summary
FieldDuplicatorMessageModifier(int sourceField, int destField)
           
 
Method Summary
 boolean modifyMessage(Message message, ReportHistoryServices historyServices, FIXMessageAugmentor augmentor)
          Implement the function to make in-line modifications to the incoming message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldDuplicatorMessageModifier

public FieldDuplicatorMessageModifier(int sourceField,
                                      int destField)
Method Detail

modifyMessage

public boolean modifyMessage(Message message,
                             ReportHistoryServices historyServices,
                             FIXMessageAugmentor augmentor)
                      throws CoreException
Description copied from interface: MessageModifier
Implement the function to make in-line modifications to the incoming message.

Specified by:
modifyMessage in interface MessageModifier
Parameters:
message - the message to be modified
augmentor - FIX-version specific augmentor to apply to this message
Returns:
true if the modifier has modified the message, false otherwise
Throws:
CoreException


Copyright © 2012. All Rights Reserved.