The Lab

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



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. @Override
public void

Code Block
languagejava
titleProcessing 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);

...


	}

...


}