Page History
...
Notice that a newTcpMarketDataSession expects a MFMarketDataHandler while newTcpMarketDataPriceDepthBookSession expects a MFPriceDepthBookHandler
As for the newTcpTradingSession() method, both of these market data-related methods take MarketFactory login credentials (username and password), and MarketFactory server address details (hostname and port). The boolean option autoReconnect is used to indicate if the MFClient instance should automatically re-logon when a disconnection of the MFClient from the MarketFactory server occurs.
| Gliffy Diagram | ||||
|---|---|---|---|---|
|
TradingSessionMFTradingHandler
onStart()
logon()
onConnect()
onLogonResponse()
callbacks
logout()
logoutResponse()
onDisconnect()
Figure 1.1. – Showing the flow to demonstrate the session lifecycle of a session. Trading is shown, but
MarketData is similar.
The MFClient layer lives in the directory $MFAPI/MFClient/.
MFClient is the central class for managing sessions with MarketFactory. Session objects are generated by the factory methods of MFClient, and are automatically registered with this instance of MFClient.
com.marketfactory.api contains interfaces, while the packages under com.marketfactory.internal
contains the implementations.