public class FIXUtils extends Object
Constructor and Description |
---|
FIXUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
compareURLs(String url1,
String url2)
Compares two given FIX URL strings.
|
quickfix.Message |
createFIXMessage(org.apache.axis2.context.MessageContext msgCtx)
Extract the FIX message embedded in an Axis2 MessageContext
|
static String[] |
generateEPRs(quickfix.SocketAcceptor acceptor,
String serviceName,
String ip)
Generate EPRs for the specified FIX service.
|
static String[] |
getEPRs(quickfix.SessionSettings settings) |
static String |
getFixApplication(org.apache.axis2.context.MessageContext msgCtx)
Extracts the application type for the message from the message context
|
static FIXUtils |
getInstance() |
static Map<String,String> |
getMessageForwardingParameters(quickfix.Message message)
Extracts the fields related to message forwarding (third party routing) from
the FIX header.
|
static org.apache.axiom.om.OMNamespace |
getNamespaceOfFIXPayload(org.apache.axiom.soap.SOAPBody fixBody)
Read the FIX message payload and identify the namespace if exists
|
static int |
getSequenceNumber(org.apache.axis2.context.MessageContext msgCtx)
Reads the SOAP body of a message and attempts to retreive the application level
sequence number
|
static String |
getServiceName(org.apache.axis2.context.MessageContext msgCtx)
Extracts the name of the service which processed the message from the MessageContext
|
static String[] |
getSocketAddressElements(String fixEPR)
Reads a FIX EPR and returns the host and port on a String array
|
static String |
getSourceSession(org.apache.axis2.context.MessageContext msgCtx)
Reads the SOAP body of a message and attempts to retreive the session identifier string
|
static Map<String,String> |
getTransportHeaders(String serviceName,
String fixApplication)
Creates a Map of transport headers for a message
|
void |
setSOAPEnvelope(quickfix.Message message,
int counter,
String sessionID,
org.apache.axis2.context.MessageContext msgCtx)
FIX messages are non-XML.
|
public static FIXUtils getInstance()
public void setSOAPEnvelope(quickfix.Message message, int counter, String sessionID, org.apache.axis2.context.MessageContext msgCtx) throws org.apache.axis2.AxisFault
message
- the FIX messagecounter
- application level sequence number of the messagesessionID
- the incoming sessionmsgCtx
- the Axis2 MessageContext to hold the FIX messageorg.apache.axis2.AxisFault
- the exception thrown when invalid soap envelopes are set to the msgCtxpublic quickfix.Message createFIXMessage(org.apache.axis2.context.MessageContext msgCtx) throws IOException
msgCtx
- the Axis2 MessageContextIOException
- the exception thrown when handling erroneous binary contentpublic static String[] generateEPRs(quickfix.SocketAcceptor acceptor, String serviceName, String ip)
acceptor
- the SocketAcceptor associated with the serviceserviceName
- the name of the serviceip
- the IP address of the hostpublic static String[] getEPRs(quickfix.SessionSettings settings) throws quickfix.FieldConvertError, quickfix.ConfigError
quickfix.FieldConvertError
quickfix.ConfigError
public static boolean compareURLs(String url1, String url2)
url1
- a FIX URL Stringurl2
- a FIX URL Stringpublic static Map<String,String> getMessageForwardingParameters(quickfix.Message message)
message
- the FIX messagepublic static String getServiceName(org.apache.axis2.context.MessageContext msgCtx) throws org.apache.axis2.AxisFault
msgCtx
- Axis2 MessageContext of a messageorg.apache.axis2.AxisFault
- on errorpublic static String getFixApplication(org.apache.axis2.context.MessageContext msgCtx)
msgCtx
- Axis2 Message Contextpublic static Map<String,String> getTransportHeaders(String serviceName, String fixApplication)
serviceName
- name of the service to which the message belongs tofixApplication
- FIX application typepublic static String[] getSocketAddressElements(String fixEPR) throws org.apache.axis2.AxisFault
fixEPR
- a FIX EPRorg.apache.axis2.AxisFault
- on errorpublic static int getSequenceNumber(org.apache.axis2.context.MessageContext msgCtx)
msgCtx
- Axis2 MessageContextpublic static String getSourceSession(org.apache.axis2.context.MessageContext msgCtx)
msgCtx
- Axis2 MessageContextpublic static org.apache.axiom.om.OMNamespace getNamespaceOfFIXPayload(org.apache.axiom.soap.SOAPBody fixBody)
fixBody
- FIX message payloadCopyright © 2005-2017 Apache Software Foundation. All Rights Reserved.