Package org.apache.synapse.transport.fix
Class FIXIncomingMessageHandler
java.lang.Object
org.apache.synapse.transport.fix.FIXIncomingMessageHandler
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionFIXIncomingMessageHandler(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 TypeMethodDescriptionvoidacquire()voidfromAdmin(quickfix.Message message, quickfix.SessionID sessionID) This callback notifies when an administrative message is sent from a counterparty to the FIX engine.voidfromApp(quickfix.Message message, quickfix.SessionID sessionID) This callback receives messages for the application.voidonCreate(quickfix.SessionID sessionID) This method is called when quickfix creates a new session.voidonLogon(quickfix.SessionID sessionID) This callback notifies when a valid logon has been established with a counter party.voidonLogout(quickfix.SessionID sessionID) This callback notifies when a FIX session is no longer online.voidsetOutgoingMessageContext(org.apache.axis2.context.MessageContext msgCtx) voidtoAdmin(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.voidtoApp(quickfix.Message message, quickfix.SessionID sessionID) This is a callback for application messages that are being sent to a counter party.
-
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
- 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:
onCreatein interfacequickfix.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:
onLogonin interfacequickfix.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:
onLogoutin interfacequickfix.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:
toAdminin interfacequickfix.Application- Parameters:
message- QuickFIX messagesessionID- 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:
fromAdminin interfacequickfix.Application- Parameters:
message- QuickFIX messagesessionID- QuickFIX session ID- Throws:
quickfix.FieldNotFoundquickfix.IncorrectDataFormatquickfix.IncorrectTagValuequickfix.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:
toAppin interfacequickfix.Application- Parameters:
message- QuickFIX messagesessionID- 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:
fromAppin interfacequickfix.Application- Parameters:
message- QuickFIX messagesessionID- QuickFIX session ID- Throws:
quickfix.FieldNotFoundquickfix.IncorrectDataFormatquickfix.IncorrectTagValuequickfix.UnsupportedMessageType
-