class O2GTablesUpdatesReader

Brief

The class reads a stream of table updates coming from the trading server.

Details

If your application uses the O2GTableManager class, the table updates must be captured in the methods of the class implementing the IO2GTableListener interface. In this case, the usage of the O2GTablesUpdatesReader class is not required.

If your application does not use O2GTableManager class and you request initial trading tables information, the following sequence of events occurs:

  1. The trading server sends a response to the initial request. For example, if you request initial accounts information, the response is of the GetAccounts type; if you request initial orders information, the response is of the GetOrders type, etc. The notifications about successful completion of these requests must be processed in your implementation of the IO2GResponseListener.onRequestCompleted method.

  2. The server sends responses about updates of the initially requested tables automatically. These responses are of the TablesUpdates type and must be processed in your implementation of the IO2GResponseListener.onTablesUpdates method.

To process the contents of a response object of the TablesUpdates type, you must use an instance of the O2GTablesUpdatesReader class. To get an instance of the class, use the O2GResponseReaderFactory.createTablesUpdatesReader method by passing the response parameter of the IO2GResponseListener.onTablesUpdates method as an argument. For example,

O2GTablesUpdatesReader updatesReader = factory.createTablesUpdatesReader(response);

Example

Tracking accounts, trades and offer updates [show]

The type defined in the fxcore2.dll assembly. The namespace is fxcore2.

Public Properties

Count

Gets the number of rows in the reader.

ServerTime

The date and time when the update was generated on the server.

Public Methods

getAccountRow

Gets an instance of the class that provides access to the account information.

getClosedTradeRow

Gets an instance of the class that provides access to the closed position information.

getMessageRow

Gets an instance of the class that provides access to the message information.

getOfferRow

Gets an instance of the class that provides access to the offer information.

getOrderRow

Gets an instance of the class that provides access to the order information.

getTradeRow

Gets an instance of the class that provides access to the open position information.

getUpdateTable

Gets the table that is updated.

getUpdateType

Gets the type of a table update.

back