Class FIXIncomingMessageHandler

java.lang.Object
org.apache.synapse.transport.fix.FIXIncomingMessageHandler
All Implemented Interfaces:
quickfix.Application

public class FIXIncomingMessageHandler extends Object implements quickfix.Application
FIXIncomingMessageHandler is responsible for handling all incoming FIX messages. This is where the Quickfix/J engine meets Synapse core. Admin level FIX messages are handled by Quickfix/J itself. All the application level messages are handed over to the Synapse core.
  • Constructor Summary

    Constructors
    Constructor
    Description
    FIXIncomingMessageHandler(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.transport.base.threads.WorkerPool workerPool, org.apache.axis2.description.AxisService service, boolean acceptor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    fromAdmin(quickfix.Message message, quickfix.SessionID sessionID)
    This callback notifies when an administrative message is sent from a counterparty to the FIX engine.
    void
    fromApp(quickfix.Message message, quickfix.SessionID sessionID)
    This callback receives messages for the application.
    void
    onCreate(quickfix.SessionID sessionID)
    This method is called when quickfix creates a new session.
    void
    onLogon(quickfix.SessionID sessionID)
    This callback notifies when a valid logon has been established with a counter party.
    void
    onLogout(quickfix.SessionID sessionID)
    This callback notifies when a FIX session is no longer online.
    void
    setOutgoingMessageContext(org.apache.axis2.context.MessageContext msgCtx)
     
    void
    toAdmin(quickfix.Message message, quickfix.SessionID sessionID)
    This callback provides Synapse with a peek at the administrative messages that are being sent from your FIX engine to the counter party.
    void
    toApp(quickfix.Message message, quickfix.SessionID sessionID)
    This is a callback for application messages that are being sent to a counter party.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FIXIncomingMessageHandler

      public FIXIncomingMessageHandler(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.transport.base.threads.WorkerPool workerPool, org.apache.axis2.description.AxisService service, boolean acceptor)
  • Method Details

    • setOutgoingMessageContext

      public void setOutgoingMessageContext(org.apache.axis2.context.MessageContext msgCtx)
    • acquire

      public void acquire() throws InterruptedException
      Throws:
      InterruptedException
    • onCreate

      public void onCreate(quickfix.SessionID sessionID)
      This method is called when quickfix creates a new session. A session comes into and remains in existence for the life of the application. Sessions exist whether or not a counter party is connected to it. As soon as a session is created, the application can begin sending messages to it. If no one is logged on, the messages will be sent at the time a connection is established with the counter party.
      Specified by:
      onCreate in interface quickfix.Application
      Parameters:
      sessionID - QuickFIX session ID
    • onLogon

      public void onLogon(quickfix.SessionID sessionID)
      This callback notifies when a valid logon has been established with a counter party. This is called when a connection has been established and the FIX logon process has completed with both parties exchanging valid logon messages.
      Specified by:
      onLogon in interface quickfix.Application
      Parameters:
      sessionID - QuickFIX session ID
    • onLogout

      public void onLogout(quickfix.SessionID sessionID)
      This callback notifies when a FIX session is no longer online. This could happen during a normal logout exchange or because of a forced termination or a loss of network connection.
      Specified by:
      onLogout in interface quickfix.Application
      Parameters:
      sessionID - QuickFIX session ID
    • toAdmin

      public void toAdmin(quickfix.Message message, quickfix.SessionID sessionID)
      This callback provides Synapse with a peek at the administrative messages that are being sent from your FIX engine to the counter party. This is normally not useful for an application however it is provided for any logging one may wish to do.
      Specified by:
      toAdmin in interface quickfix.Application
      Parameters:
      message - QuickFIX message
      sessionID - QuickFIX session ID
    • fromAdmin

      public void fromAdmin(quickfix.Message message, quickfix.SessionID sessionID) throws quickfix.FieldNotFound, quickfix.IncorrectDataFormat, quickfix.IncorrectTagValue, quickfix.RejectLogon
      This callback notifies when an administrative message is sent from a counterparty to the FIX engine.
      Specified by:
      fromAdmin in interface quickfix.Application
      Parameters:
      message - QuickFIX message
      sessionID - QuickFIX session ID
      Throws:
      quickfix.FieldNotFound
      quickfix.IncorrectDataFormat
      quickfix.IncorrectTagValue
      quickfix.RejectLogon - causes a logon reject
    • toApp

      public void toApp(quickfix.Message message, quickfix.SessionID sessionID) throws quickfix.DoNotSend
      This is a callback for application messages that are being sent to a counter party.
      Specified by:
      toApp in interface quickfix.Application
      Parameters:
      message - QuickFIX message
      sessionID - QuickFIX session ID
      Throws:
      quickfix.DoNotSend - This exception aborts message transmission
    • fromApp

      public void fromApp(quickfix.Message message, quickfix.SessionID sessionID) throws quickfix.FieldNotFound, quickfix.IncorrectDataFormat, quickfix.IncorrectTagValue, quickfix.UnsupportedMessageType
      This callback receives messages for the application. This is one of the core entry points for the FIX application. Every application level request will come through here. A new thread will be spawned from the thread pool for each incoming message.
      Specified by:
      fromApp in interface quickfix.Application
      Parameters:
      message - QuickFIX message
      sessionID - QuickFIX session ID
      Throws:
      quickfix.FieldNotFound
      quickfix.IncorrectDataFormat
      quickfix.IncorrectTagValue
      quickfix.UnsupportedMessageType