FIX Session Initiator

Create

Call the following method to create a session:

FIXSession session = sessionParameters.createNewFIXSession();

You can use the autoreconnectAttempts configurations parameter set to positive value to create sessions that will try to reconnect if connection is lost.

After the session is created set a listener

session.setFIXSessionListener(FIXSessionListener listener);

After the session is created use the method below to connect it as initiator.

 session.connect(); 

Establish connection

After session.connect() is called the initiator starts attempts to establish a FIX session in the background. The following scenario is executed:

There is no need to wait until connection is established to send messages. If connection is not established, messages will be sent later after connection process succeeds.

Reconnect

Initiator is responsible for restoring a connection once it is broken. When connection error is detected the initiator moves to "Reconnect" state and starts the reconnection process. The foillowing scenario is executed:

  1. Establish telecommunication link
  2. Send Logon message
  3. Repeat from 1 if 1 or 2 fails
  4. Stop trying if attempts are over

The number of reconnection attempts and delay can be set in the properties file.

Disconnect

You can use the following method to disconnect the initiator (the process can also be called "terminate", "delete", "close"):

 session.disconnect(String reason); 

Dispouse

To release all session's resources and unregister session use:

 session.dispouse(); 

Send message

To send outgoing application-level messages use the session.sendMessage(String type, FIXFieldList content) method. or the session.sendMessage(FIXFieldList message) method.

All session-level messages are sent automatically when needed.

Generated on Wed Aug 22 17:11:17 2018 for FIXAntennaJava by  doxygen 1.6.3