org.marketcetera.client.utils
Class AutoOrderHistoryManager

java.lang.Object
  extended by org.marketcetera.trade.utils.OrderHistoryManager
      extended by org.marketcetera.client.utils.LiveOrderHistoryManager
          extended by org.marketcetera.client.utils.AutoOrderHistoryManager
All Implemented Interfaces:
ReportListener, Lifecycle

public class AutoOrderHistoryManager
extends LiveOrderHistoryManager
implements ReportListener

Provides a self-populating OrderHistoryManager implementation.

Instantiate this class with an origin date. The origin date establishes how far back to look for order history.

This class will receive new reports on its own - it is not necessary nor is it permitted to manually add reports.

Note that there are significant performance and resource implications when using this class. Depending on historical order volume, this class may be required to process thousands or millions of reports. There are two ramifications of this:

It may take a significant amount of time to start this object as it must process historical order history. Callers may choose to make this operation asynchronous. The object will report that it is running when the processing is complete.

Since:
2.1.4
Version:
$Id: AutoOrderHistoryManager.java 16154 2012-07-14 16:34:05Z colin $
Author:
Colin DuPlantis

Constructor Summary
AutoOrderHistoryManager(Date inReportHistoryOrigin)
          Create a new AutoOrderHistoryManager instance.
 
Method Summary
 void add(ReportBase inReport)
           
 void receiveCancelReject(OrderCancelReject inReport)
          Invoked to supply an order cancel reject report instance to the report listener.
 void receiveExecutionReport(ExecutionReport inReport)
          Invoked to supply an execution report instance to the report listener.
 void start()
           
 void stop()
           
 
Methods inherited from class org.marketcetera.client.utils.LiveOrderHistoryManager
getClient, getOpenOrders, getReportHistoryOrigin, isRunning, toString
 
Methods inherited from class org.marketcetera.trade.utils.OrderHistoryManager
clear, clear, display, getLatestReportFor, getOrderChain, getOrderIds, getReportHistoryFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AutoOrderHistoryManager

public AutoOrderHistoryManager(Date inReportHistoryOrigin)
                        throws ClientInitException
Create a new AutoOrderHistoryManager instance.

Parameters:
inReportHistoryOrigin - a Date value indicating the point from which to gather order history or null
Throws:
ClientInitException - if a connection to the Client cannot be made
Method Detail

add

public void add(ReportBase inReport)
Overrides:
add in class OrderHistoryManager

receiveExecutionReport

public void receiveExecutionReport(ExecutionReport inReport)
Description copied from interface: ReportListener
Invoked to supply an execution report instance to the report listener.

Specified by:
receiveExecutionReport in interface ReportListener
Parameters:
inReport - The received execution report.

receiveCancelReject

public void receiveCancelReject(OrderCancelReject inReport)
Description copied from interface: ReportListener
Invoked to supply an order cancel reject report instance to the report listener.

Specified by:
receiveCancelReject in interface ReportListener
Parameters:
inReport - The received order cancel rejection report.

start

public void start()
Specified by:
start in interface Lifecycle
Overrides:
start in class LiveOrderHistoryManager

stop

public void stop()
Specified by:
stop in interface Lifecycle
Overrides:
stop in class LiveOrderHistoryManager


Copyright © 2012. All Rights Reserved.