The Lab

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »



A session may be logged off in one of two ways: synchronously at the request of the client, or asynchronously by the server, either as a result of the client being a slow consumer of data, or being disconnected by MarketFactory support personnel.

Processing logoff request from server
@Override
public void on(com.marketfactory.mfclient.api.core.trading.Logout logout, MFMarketDataSession session) {
	System.out.println("Processing logoff request on trading session " + session.getVenueName() + ", reason: " + logout.getText());
	try {
		session.logoutResponse(); // acknowledge logout request
	} catch (final MFException mfe) { 
		mfe.printStackTrace();
		System.exit(-1);
	}
} 






  • No labels