public class ServerOrderProcessor extends Object implements OrderProcessor
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
ServerOrderProcessor(ClientParameters inParameter)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
done()
Invoked to release resources when the system is done processing
orders.
|
void |
processOrder(Order inOrder,
int inOrderIndex)
Processes the supplied order.
|
public static final long MAXIMUM_DELIVERY_WAIT
public ServerOrderProcessor(ClientParameters inParameter) throws ClientInitException, ConnectionException
inParameter - the parameters to connect to the server.ClientInitException - if there were unexpected issues initializing
the client.ConnectionException - if there were network issues initializing
the client.public void processOrder(Order inOrder, int inOrderIndex) throws Exception
OrderProcessorprocessOrder in interface OrderProcessorinOrder - 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.Exception - if there was an error processing the orderpublic void done()
OrderProcessordone in interface OrderProcessorCopyright © 2014. All Rights Reserved.