org.marketcetera.orderloader
Class OrderLoader

java.lang.Object
  extended by org.marketcetera.orderloader.OrderLoader

public class OrderLoader
extends Object

An order loader that reads orders from a supplied csv input file and processes them.

Since:
1.0.0
Version:
$Id: OrderLoader.java 16154 2012-07-14 16:34:05Z colin $
Author:
anshul@marketcetera.com

Field Summary
static String MODE_SYSTEM
           
 
Constructor Summary
OrderLoader(String inMode, BrokerID inBrokerID, OrderProcessor inOrderProcessor, File inFile)
          Creates a new instance that processes orders from a csv input file.
 
Method Summary
 List<FailedOrderInfo> getFailedOrders()
          Details on failed orders.
 int getNumBlankLines()
          Number of blank lines.
 int getNumComments()
          Number of lines with comments.
 int getNumFailed()
          Number of orders that failed to process.
 int getNumLines()
          Number of lines of input processed.
 int getNumSuccess()
          Number of orders successfully processed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MODE_SYSTEM

public static final String MODE_SYSTEM
See Also:
Constant Field Values
Constructor Detail

OrderLoader

public OrderLoader(String inMode,
                   BrokerID inBrokerID,
                   OrderProcessor inOrderProcessor,
                   File inFile)
            throws OrderParsingException,
                   IOException
Creates a new instance that processes orders from a csv input file.

Parameters:
inMode - the mode. Can be sys or a FIX version value. If null, defaults to sys.
inBrokerID - the broker's ID to which the orders should be sent. Can be null, if the mode is sys.
inOrderProcessor - the processor that should process all the orders parsed out by the order loader. Cannot be null.
inFile - the csv file that contains orders that need to be parsed. Cannot be null.
Throws:
OrderParsingException - if there were errors
IOException - if there were errors reading data from the supplied file.
Method Detail

getNumLines

public int getNumLines()
Number of lines of input processed.

Returns:
number of lines processed.

getNumBlankLines

public int getNumBlankLines()
Number of blank lines.

Returns:
number of blank lines.

getNumComments

public int getNumComments()
Number of lines with comments.

Returns:
number of lines with comments.

getNumSuccess

public int getNumSuccess()
Number of orders successfully processed.

Returns:
number of orders processed.

getNumFailed

public int getNumFailed()
Number of orders that failed to process.

Returns:
number of orders failed.

getFailedOrders

public List<FailedOrderInfo> getFailedOrders()
Details on failed orders.

Returns:
details on failed orders.


Copyright © 2012. All Rights Reserved.