static public field O2GResponseType.GetAccounts

Brief

The constant represents the type of a response to a request for initial account information.

Details

If your application uses the O2GTableManager, the Accounts table is always loaded during the login process. This information is kept in an O2GAccountsTable object.

If your application does not use the O2GTableManager, initial account information needs to be requested.
Depending on the trading server settings, the Accounts table may or may not be loaded by the server automatically during the login process. To determine whether the table is loaded or not and what follow-up action is required to obtain the O2GResponseType.GetAccounts response, use the returned value of the O2GLoginRules.isTableLoadedByDefault method with the O2GTableType.Accounts argument:

Returned Value

Follow-up action

true

Call the O2GLoginRules.getTableRefreshResponse method. For example,

O2GResponse accountsResponse = loginRules.getTableRefreshResponse(O2GTableType.ACCOUNTS);

The method returns an instance of the O2GResponse class of the O2GResponseType.GetAccounts type.

false

Create a request to get initial account information by using the O2GRequestFactory.createRefreshTableRequest method. For example,

O2GRequest request = requestFactory.createRefreshTableRequest(O2GTableType.ACCOUNTS);

In this case, an instance of the O2GResponse class is the response parameter in your implementation of the IO2GResponseListener.onRequestCompleted method.

To process the contents of a response object of the O2GResponseType.GetAccounts type, use an instance of the O2GAccountsTableResponseReader class.

Declared in O2GResponseType

back