|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.orderloader.RowProcessor
org.marketcetera.orderloader.fix.FIXProcessor
public class FIXProcessor
The processor that parses rows into FIX Messages.
| Field Summary | |
|---|---|
protected static String |
MKT_PRICE
|
| Constructor Summary | |
|---|---|
FIXProcessor(OrderProcessor inProcessor,
BrokerID inBrokerID,
FIXVersion inFIXVersion)
Creates an instance. |
|
| Method Summary | |
|---|---|
protected static void |
addDefaults(Message message)
|
protected Field<?> |
getQuickFixFieldFromName(String inFieldName)
Translate the incoming field name from String to a FIX standard using reflection. |
protected static char |
getSide(String inValue)
|
protected String |
parseMessageValue(Field<?> inField,
String inFieldName,
String inValue,
Message inMessage)
For some fields (day, side, etc) we do custom lookups since the orders may be "DAY", MKT (for price), etc For all others, delegate to the basic field type lookup |
protected Order |
parseOrder(String[] inRow)
Parses the supplied row and creates an order instance from it. |
void |
setHeaders(String[] inHeaders)
Implemented by subclasses to initialize themselves with the supplied headers. |
| Methods inherited from class org.marketcetera.orderloader.RowProcessor |
|---|
geBrokerID, getFailedOrders, getNumFailed, getNumSuccess, getTotal, initialize, processOrder |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static String MKT_PRICE
| Constructor Detail |
|---|
public FIXProcessor(OrderProcessor inProcessor,
BrokerID inBrokerID,
FIXVersion inFIXVersion)
throws OrderParsingException
inProcessor - the processor.inBrokerID - the brokerID.inFIXVersion - the FIX Version to use for parsing, constructing
and validating messages.
OrderParsingException - if the
supplied FIX Version cannot be supported or
if brokerID was not supplied.| Method Detail |
|---|
public void setHeaders(String[] inHeaders)
throws OrderParsingException
RowProcessor
setHeaders in class RowProcessorinHeaders - the headers specified in the csv file.
OrderParsingException - if there were errors with the supplied
headers.
protected Order parseOrder(String[] inRow)
throws OrderParsingException
RowProcessor
parseOrder in class RowProcessorinRow - the supplied row.
OrderParsingException - if there were errors parsing the
protected Field<?> getQuickFixFieldFromName(String inFieldName)
throws OrderParsingException
inFieldName - the field name.
OrderParsingException - if there were failures
protected String parseMessageValue(Field<?> inField,
String inFieldName,
String inValue,
Message inMessage)
throws OrderParsingException
inField - the field we are convertinginFieldName - the name of the field being processed.inValue - string valueinMessage - the message to add the processed field to.
OrderParsingException - if there were errors parsing the field.protected static char getSide(String inValue)
protected static void addDefaults(Message message)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||