FIXStandaloneApplication

FIXStandaloneApplication is very easy to program. In this chapter will will demonstrate step by step how to write a standalone QWFIX application.

 

Initialization

At the begining of your program you may need to initialize the memory size of FIX message cache.

Read FIXEngine.InitMessageCache to learn how to initialize the message cache size.

 

Create a Standalone FIX Application

Only three steps and less than a dozen lines of code is needed to create a QWFIX enabled application.

  1. Create a new instance of FIXStandaloneApplication.
  2. Register event handlers on the FIXStandaloneApplication instance.
  3. Start the application process by calling FIXStandaloneApplication.Run.

For more information, please read the code snpppet "Initialize QWFIX Enabled Application".

 

FIXStandaloneApplication Events

The step 2 of the three steps above is very important. Application is required to implement and register a minimum set of event handlers.

FIXStandaloneApplication only triggers events after FIXStandaloneApplication.Run is called (step 3).

Below is a complete list of all possible events that may be triggered by FIXStandaloneApplication.

 FIXStandaloneApplication.FIXEngineInitialized should always be implemented in any application.

 

FIXStandaloneApplication Error Handling

If any irrecoverable fatal error occurs during initialization process, such as Repository Server error (cannot load settings), settings error or fatal application error (e.g. message handler is not set on a session), FIXStandaloneApplication.FatalErrorOccurs event will be triggered.