public method O2GTableManager.getStatus

Brief

Gets a table manager status.

Declaration
Java
O2GTableManagerStatus  getStatus ()

Details

The table manager status defines wheather the trading tables data can be used or not.

The possible return values are:

TABLES_LOAD_FAILED

The loading of at least one of the trading tables has failed. The trading tables data can not be used.

TABLES_LOADED

All trading tables have been loaded from the trading server into the ForexConnect memory. The trading tables data can be used.

TABLES_LOADING

The trading tables are being loaded from the trading server into the ForexConnect memory. The trading tables data can not be used.

Example

Getting the table manager status [hide]

          mSession.useTableManager(O2GTableManagerMode.YES, null);
          //...
          O2GTableManager tableManager = mSession.getTableManager();
          while (tableManager.getStatus() != O2GTableManagerStatus.TABLES_LOADED &&
                 tableManager.getStatus() != O2GTableManagerStatus.TABLES_LOAD_FAILED) {
              Thread.sleep(50);
          }
          if (tableManager.getStatus() == O2GTableManagerStatus.TABLES_LOADED) {
              //...
          }

Note: The method has the following disadvantage: your thread is suspended and can not be used while you are waiting for the TABLES_LOADED status. For example, if your application requires loading of the GUI components or some other processing that is not directly dependent on the status of the table manager, these processes are also suspended. If you can not afford a temporarily suspension of the main thread, your application must implement the IO2GTableManagerListener.onStatusChanged method to get a table manager status.

Declared in O2GTableManager

back