public method O2GSession.setTradingSession

Brief

Sets the trading session if a trading session is requested.

Declaration
Java
void  setTradingSession (String sessionId, String pin)

Parameters
sessionId

The identifier of the trading session. Must be one of the values returned by the O2GSessionDescriptor.getID() method of one of the objects returned by the getTradingSessionDescriptors() method.

pin

The pin code. If no pin is required, specify an empty string ("").

Details

The method can be used only after the O2GSessionStatusCode.TRADING_SESSION_REQUESTED session status is received. The subsession identifier must be one of the subsession identifiers returned by the getTradingSessionDescriptors() method.

The login process is suspended between receiving of the O2GSessionStatus.TRADING_SESSION_REQUESTED session status and calling of the setTradingSession method, so you can, for example, show the dialog to choose the trading session to the user.

When the trading session is specified using the setTradingSession method, the login process is resumed.

Declared in O2GSession

back