org.marketcetera.orderloader
Class ServerOrderProcessor

java.lang.Object
  extended by org.marketcetera.orderloader.ServerOrderProcessor
All Implemented Interfaces:
OrderProcessor

public class ServerOrderProcessor
extends Object
implements OrderProcessor

An order processor that sends orders to the server.

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

Field Summary
static long MAXIMUM_DELIVERY_WAIT
          The maximum time, in ms, to wait without receiving any acknowledgements from the ORS until delivery of all sent orders is acknowledged by the ORS.
 
Constructor Summary
ServerOrderProcessor(ClientParameters inParameter)
          Creates an instance.
 
Method Summary
 void done()
          Invoked to release resources when the system is done processing orders.
 void processOrder(Order inOrder, int inOrderIndex)
          Processes the supplied order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM_DELIVERY_WAIT

public static final long MAXIMUM_DELIVERY_WAIT
The maximum time, in ms, to wait without receiving any acknowledgements from the ORS until delivery of all sent orders is acknowledged by the ORS.

See Also:
Constant Field Values
Constructor Detail

ServerOrderProcessor

public ServerOrderProcessor(ClientParameters inParameter)
                     throws ClientInitException,
                            ConnectionException
Creates an instance.

Parameters:
inParameter - the parameters to connect to the server.
Throws:
ClientInitException - if there were unexpected issues initializing the client.
ConnectionException - if there were network issues initializing the client.
Method Detail

processOrder

public void processOrder(Order inOrder,
                         int inOrderIndex)
                  throws Exception
Description copied from interface: OrderProcessor
Processes the supplied order.

Specified by:
processOrder in interface OrderProcessor
Parameters:
inOrder - the order to be sent.
inOrderIndex - the index number of this order. When orders are fed from a file, this will be the line number at which the order appears in the file.
Throws:
Exception - if there was an error processing the order

done

public void done()
Description copied from interface: OrderProcessor
Invoked to release resources when the system is done processing orders.

Specified by:
done in interface OrderProcessor


Copyright © 2012. All Rights Reserved.