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 GET_ACCOUNTS type; if you request initial orders information, the response is of the GET_ORDERS 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 TABLES_UPDATES type and must be processed in your implementation of the IO2GResponseListener.onTablesUpdates method.

To process the contents of a response object of the TABLES_UPDATES 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 namespace is com.fxcore2.

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.

getServerTime

Gets a calendar instance representing the date/time of a table update.

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.

size

Gets the number of rows in the reader.

back