`
tacyuuhon
  • 浏览: 2506 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

The QuickFIX/J Demo

阅读更多

Source List:

 

SRC
│  log4j.properties
│  
├─conf
│  └─demo
│          acceptor.conf
│          initiator.conf
│          
└─myfix
    ├─common
    │      AccountConstant.java
    │      LoggerWapper.java
    │      MessageCreateFactory.java
    │      
    ├─core
    │  └─application
    │          AbstractApplication.java
    │          ApplicationAdapter.java
    │          EventType.java
    │          
    └─demo
        ├─acceptor
        │  │  AcceptorStartup.java
        │  │  
        │  ├─application
        │  │      AcceptorApplication.java
        │  │      
        │  ├─launcher
        │  │      AcceptorLauncher.java
        │  │      
        │  └─rate
        │          RateGenerater.java
        │          RateSender.java
        │          
        └─initiator
            │  InitiatorStartup.java
            │  
            ├─application
            │      InitiatorApplication.java
            │      RateReceiver.java
            │      
            └─launcher
                    InitiatorLauncher.java

 

log4j.properties

 

log4j.rootLogger=debug, stdout,file

### direct log messages to stdout ###
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p [%t] %c:%L - %m%n

### direct messages to file hibernate.log ###
log4j.appender.file=org.apache.log4j.FileAppender
log4j.appender.file.File=c:/quickfix.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p [%t] %c{1}:%L - %m%n

### set log levels - for more verbose logging change 'info' to 'debug' ###

log4j.logger.quickfix=INFO
log4j.logger.quickfixj=INFO
log4j.logger.org.quickfix=INFO
log4j.logger.myfix=INFO

 

 

acceptor.conf

 

[DEFAULT]
ConnectionType=acceptor 
BeginString=FIX.4.4
StartTime=00:00:00
EndTime=00:00:00
RefreshMessageStoreAtLogon=Y
ReconnectInterval=5
ResetOnLogout=Y
ResetOnLogon=Y
ResetOnDisconnect=Y
FileStorePath=data/demo/market
FileLogPath=data/demo/log

[SESSION]
TargetCompID=QUICKFIX_USER1
SenderCompID=QUICKFIX
SenderSubID=QUICKFIX_GROUP1
SocketAcceptPort=8181

[SESSION]
TargetCompID=QUICKFIX_USER2
SenderCompID=QUICKFIX
SenderSubID=QUICKFIX_GROUP2
SocketAcceptPort=8181

 

 

initiator.conf

 

[DEFAULT]
ConnectionType=initiator
BeginString=FIX.4.4
StartTime=00:00:00
EndTime=00:00:00
HeartBtInt=15
FileStorePath=data/demo/market
FileLogPath=data/demo/log

ReconnectInterval=5
ResetOnLogout=Y
ResetOnLogon=Y
ResetOnDisconnect=Y

[SESSION]
SocketConnectHost=localhost
SocketConnectPort=8181
SenderCompID=QUICKFIX_USER1
TargetCompID=QUICKFIX
TargetSubID=QUICKFIX_GROUP1

[SESSION]
SocketConnectHost=localhost	
SocketConnectPort=8181
SenderCompID=QUICKFIX_USER2
TargetCompID=QUICKFIX
TargetSubID=QUICKFIX_GROUP2

 

 

myfix.common.AccountConstant.java

 

package myfix.common;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class AccountConstant {

	public final static String QUICKFIX_USER1 = "QUICKFIX_USER1";
	
	public final static String QUICKFIX_USER2 = "QUICKFIX_USER2";
}

 

 

myfix.common.LoggerWapper.java

 

package myfix.common;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class LoggerWapper {
	private final static Log logger = LogFactory.getLog(LoggerWapper.class);
	private final static String CLASS_NAME = LoggerWapper.class.getName();

	public static void debug(Object msg) {
		logger.debug(msg);
	}

	public static void debug(Object msg, Throwable t) {
		logger.debug(msg, t);
	}

	public static void info(Object msg) {
		logger.info(msg);
	}

	public static void info(Object msg, Throwable t) {
		logger.info(msg, t);
	}

	public static void trace(Object msg) {
		logger.trace(msg);
	}

	public static void trace(Object msg, Throwable t) {
		logger.trace(msg, t);
	}

	public static void warn(Object msg) {
		logger.warn(msg);
	}

	public static void warn(Object msg, Throwable t) {
		logger.warn(msg, t);
	}

	public static void error(Object msg) {
		logger.error(msg);
	}

	public static void error(Object msg, Throwable t) {
		logger.error(msg, t);
	}

	public static void fatal(Object msg) {
		logger.fatal(msg);
	}

	public static void fatal(Object msg, Throwable t) {
		logger.fatal(msg, t);
	}

	public static String getInvokeMessage(String message) {
		String msg = "";
		String className = "";
		String methodName = "";
		int lineNumber = 0;
		
		StackTraceElement stack[] = (new Throwable()).getStackTrace();
		int ix = 0;
		while (ix < stack.length) {
			StackTraceElement frame = stack[ix];
			String cname = frame.getClassName();
			if (cname.equals(CLASS_NAME)) {
				break;
			}
			ix++;
		}
		while (ix < stack.length) {
			StackTraceElement frame = stack[ix];
			String cname = frame.getClassName();
			if (!cname.equals(CLASS_NAME)) {
				className = cname;
				methodName = frame.getMethodName();
				lineNumber = frame.getLineNumber();
				break;
			}
			ix++;
		}
		
		msg = className + "." + methodName+"("+lineNumber+") " + message;
		return msg;
	}
	
	public static void traceCallStart() {
		debug(getInvokeMessage("START CALL"));
		//traceCalling();
	}
	
	public static void traceCalling() {
		info(getInvokeMessage("CALLING..."));
	}
	
	public static void traceCallEnd() {
		debug(getInvokeMessage("END CALL"));
	}

}

 

 

myfix.common.MessageCreateFactory.java

 

package myfix.common;

import quickfix.FixVersions;
import quickfix.Message;
import quickfix.SessionID;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class MessageCreateFactory {
    
    private static final quickfix.fix40.MessageFactory MESSAGE_FACTORY_VER_40 = new quickfix.fix40.MessageFactory();
    private static final quickfix.fix41.MessageFactory MESSAGE_FACTORY_VER_41 = new quickfix.fix41.MessageFactory();
    private static final quickfix.fix42.MessageFactory MESSAGE_FACTORY_VER_42 = new quickfix.fix42.MessageFactory();
    private static final quickfix.fix43.MessageFactory MESSAGE_FACTORY_VER_43 = new quickfix.fix43.MessageFactory();
    private static final quickfix.fix44.MessageFactory MESSAGE_FACTORY_VER_44 = new quickfix.fix44.MessageFactory();
    private static final quickfix.fix50.MessageFactory MESSAGE_FACTORY_VER_50 = new quickfix.fix50.MessageFactory();

    public static <T> T createMessage(Class<T> type) {
        Object obj = null;
        try {
            obj = type.newInstance();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return type.cast(obj);
    }
    
    public static <T> T cast(Object obj, Class<T> type) {
        return type.cast(obj);
    }
    
    public static Message createMessage(SessionID sessionID, String msgType) {
        return buildMessage(sessionID.getBeginString(), msgType);
    }

    public static Message createMessage(String fixVersions, String msgType) {
        return buildMessage(fixVersions, msgType);
    }
    
    private static Message buildMessage(String fixVersions, String msgType) {
        Message message = null;
        if(FixVersions.BEGINSTRING_FIX40.equals(fixVersions)) {
            message = MESSAGE_FACTORY_VER_40.create(FixVersions.BEGINSTRING_FIX40, msgType);
        } else if(FixVersions.BEGINSTRING_FIX41.equals(fixVersions)) {
            message = MESSAGE_FACTORY_VER_41.create(FixVersions.BEGINSTRING_FIX41, msgType);
        } else if(FixVersions.BEGINSTRING_FIX42.equals(fixVersions)) {
            message = MESSAGE_FACTORY_VER_42.create(FixVersions.BEGINSTRING_FIX42, msgType);
        } else if(FixVersions.BEGINSTRING_FIX43.equals(fixVersions)) {
            message = MESSAGE_FACTORY_VER_43.create(FixVersions.BEGINSTRING_FIX43, msgType);
        } else if(FixVersions.BEGINSTRING_FIX44.equals(fixVersions)) {
            message = MESSAGE_FACTORY_VER_44.create(FixVersions.BEGINSTRING_FIX44, msgType);
        } else if(FixVersions.FIX50.equals(fixVersions)) {
            message = MESSAGE_FACTORY_VER_50.create(FixVersions.FIX50, msgType);
        }
        return message;
    }

}

 

 

 

myfix.core.application.AbstractApplication.java

 

package myfix.core.application;

import myfix.common.LoggerWapper;
import quickfix.Application;
import quickfix.DoNotSend;
import quickfix.FieldNotFound;
import quickfix.IncorrectDataFormat;
import quickfix.IncorrectTagValue;
import quickfix.Message;
import quickfix.RejectLogon;
import quickfix.Session;
import quickfix.SessionID;
import quickfix.SessionNotFound;
import quickfix.UnsupportedMessageType;
import quickfix.field.MsgType;

/**
 * The code is auto generate. Do not modify
 * @author Tacyuuhon
 *
 */
public abstract class AbstractApplication implements Application {

	public void fromAdmin(Message message, SessionID sessionID) throws FieldNotFound,
			IncorrectDataFormat, IncorrectTagValue, RejectLogon {
		processMessage(message, sessionID,EventType.FROM_ADMIN);
	}

	public void fromApp(Message message, SessionID sessionID) throws FieldNotFound,
			IncorrectDataFormat, IncorrectTagValue, UnsupportedMessageType {
		processMessage(message, sessionID,EventType.FROM_APP);
	}

	public void onCreate(SessionID sessionID) {
		processOnCreate(sessionID);
	}

	public void onLogon(SessionID sessionID) {
		processOnLogon(sessionID);
	}

	public void onLogout(SessionID sessionID) {
		processOnLogout(sessionID);
	}

	public void toAdmin(Message message, SessionID sessionID) {
		try {
			processMessage(message, sessionID,EventType.TO_ADMIN);
		} catch (FieldNotFound e) {
			e.printStackTrace();
		}
	}

	public void toApp(Message message, SessionID sessionID) throws DoNotSend {
		try {
			processMessage(message, sessionID,EventType.TO_APP);
		} catch (FieldNotFound e) {
			e.printStackTrace();
		}
	}
	
	public boolean sendMessage(Message message) {
		boolean sendStatus = false;
		try {
			sendStatus = Session.sendToTarget(message);
		} catch (SessionNotFound e) {
			LoggerWapper.error(e);
			sendStatus = false;
		}
		return sendStatus;
	}
	
	public boolean sendMessage(Message message, SessionID sessionID) {
		boolean sendStatus = false;
		try {
			sendStatus = Session.sendToTarget(message,sessionID);
		} catch (SessionNotFound e) {
			LoggerWapper.error(e.getMessage(), e.getCause());
			sendStatus = false;
		}
		return sendStatus;
	}
	
	private void processMessage(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound {
		String msgType = message.getHeader().getString(MsgType.FIELD);
		
		if(MsgType.HEARTBEAT.equals(msgType)) {
			processHeartbeat(message, sessionID, eventType); //--> 35=0
		} else if(MsgType.TEST_REQUEST.equals(msgType)) {
			processTestRequest(message, sessionID, eventType); //--> 35=1
		} else if(MsgType.RESEND_REQUEST.equals(msgType)) {
			processResendRequest(message, sessionID, eventType); //--> 35=2
		} else if(MsgType.REJECT.equals(msgType)) {
			processReject(message, sessionID, eventType); //--> 35=3
		} else if(MsgType.SEQUENCE_RESET.equals(msgType)) {
			processSequenceReset(message, sessionID, eventType); //--> 35=4
		} else if(MsgType.LOGOUT.equals(msgType)) {
			processLogout(message, sessionID, eventType); //--> 35=5
		} else if(MsgType.INDICATION_OF_INTEREST.equals(msgType)) {
			processIndicationOfInterest(message, sessionID, eventType); //--> 35=6
		} else if(MsgType.ADVERTISEMENT.equals(msgType)) {
			processAdvertisement(message, sessionID, eventType); //--> 35=7
		} else if(MsgType.EXECUTION_REPORT.equals(msgType)) {
			processExecutionReport(message, sessionID, eventType); //--> 35=8
		} else if(MsgType.ORDER_CANCEL_REJECT.equals(msgType)) {
			processOrderCancelReject(message, sessionID, eventType); //--> 35=9
		} else if(MsgType.LOGON.equals(msgType)) {
			processLogon(message, sessionID, eventType); //--> 35=A
		} else if(MsgType.NEWS.equals(msgType)) {
			processNews(message, sessionID, eventType); //--> 35=B
		} else if(MsgType.EMAIL.equals(msgType)) {
			processEmail(message, sessionID, eventType); //--> 35=C
		} else if(MsgType.ORDER_SINGLE.equals(msgType)) {
			processOrderSingle(message, sessionID, eventType); //--> 35=D
		} else if(MsgType.ORDER_LIST.equals(msgType)) {
			processOrderList(message, sessionID, eventType); //--> 35=E
		} else if(MsgType.ORDER_CANCEL_REQUEST.equals(msgType)) {
			processOrderCancelRequest(message, sessionID, eventType); //--> 35=F
		} else if(MsgType.ORDER_CANCEL_REPLACE_REQUEST.equals(msgType)) {
			processOrderCancelReplaceRequest(message, sessionID, eventType); //--> 35=G
		} else if(MsgType.ORDER_STATUS_REQUEST.equals(msgType)) {
			processOrderStatusRequest(message, sessionID, eventType); //--> 35=H
		} else if(MsgType.ALLOCATION_INSTRUCTION.equals(msgType)) {
			processAllocationInstruction(message, sessionID, eventType); //--> 35=J
		} else if(MsgType.LIST_CANCEL_REQUEST.equals(msgType)) {
			processListCancelRequest(message, sessionID, eventType); //--> 35=K
		} else if(MsgType.LIST_EXECUTE.equals(msgType)) {
			processListExecute(message, sessionID, eventType); //--> 35=L
		} else if(MsgType.LIST_STATUS_REQUEST.equals(msgType)) {
			processListStatusRequest(message, sessionID, eventType); //--> 35=M
		} else if(MsgType.LIST_STATUS.equals(msgType)) {
			processListStatus(message, sessionID, eventType); //--> 35=N
		} else if(MsgType.ALLOCATION_INSTRUCTION_ACK.equals(msgType)) {
			processAllocationInstructionAck(message, sessionID, eventType); //--> 35=P
		} else if(MsgType.DONT_KNOW_TRADE.equals(msgType)) {
			processDontKnowTrade(message, sessionID, eventType); //--> 35=Q
		} else if(MsgType.QUOTE_REQUEST.equals(msgType)) {
			processQuoteRequest(message, sessionID, eventType); //--> 35=R
		} else if(MsgType.QUOTE.equals(msgType)) {
			processQuote(message, sessionID, eventType); //--> 35=S
		} else if(MsgType.SETTLEMENT_INSTRUCTIONS.equals(msgType)) {
			processSettlementInstructions(message, sessionID, eventType); //--> 35=T
		} else if(MsgType.MARKET_DATA_REQUEST.equals(msgType)) {
			processMarketDataRequest(message, sessionID, eventType); //--> 35=V
		} else if(MsgType.MARKET_DATA_SNAPSHOT_FULL_REFRESH.equals(msgType)) {
			processMarketDataSnapshotFullRefresh(message, sessionID, eventType); //--> 35=W
		} else if(MsgType.MARKET_DATA_INCREMENTAL_REFRESH.equals(msgType)) {
			processMarketDataIncrementalRefresh(message, sessionID, eventType); //--> 35=X
		} else if(MsgType.MARKET_DATA_REQUEST_REJECT.equals(msgType)) {
			processMarketDataRequestReject(message, sessionID, eventType); //--> 35=Y
		} else if(MsgType.QUOTE_CANCEL.equals(msgType)) {
			processQuoteCancel(message, sessionID, eventType); //--> 35=Z
		} else if(MsgType.QUOTE_STATUS_REQUEST.equals(msgType)) {
			processQuoteStatusRequest(message, sessionID, eventType); //--> 35=a
		} else if(MsgType.MASS_QUOTE_ACKNOWLEDGEMENT.equals(msgType)) {
			processMassQuoteAcknowledgement(message, sessionID, eventType); //--> 35=b
		} else if(MsgType.SECURITY_DEFINITION_REQUEST.equals(msgType)) {
			processSecurityDefinitionRequest(message, sessionID, eventType); //--> 35=c
		} else if(MsgType.SECURITY_DEFINITION.equals(msgType)) {
			processSecurityDefinition(message, sessionID, eventType); //--> 35=d
		} else if(MsgType.SECURITY_STATUS_REQUEST.equals(msgType)) {
			processSecurityStatusRequest(message, sessionID, eventType); //--> 35=e
		} else if(MsgType.SECURITY_STATUS.equals(msgType)) {
			processSecurityStatus(message, sessionID, eventType); //--> 35=f
		} else if(MsgType.TRADING_SESSION_STATUS_REQUEST.equals(msgType)) {
			processTradingSessionStatusRequest(message, sessionID, eventType); //--> 35=g
		} else if(MsgType.TRADING_SESSION_STATUS.equals(msgType)) {
			processTradingSessionStatus(message, sessionID, eventType); //--> 35=h
		} else if(MsgType.MASS_QUOTE.equals(msgType)) {
			processMassQuote(message, sessionID, eventType); //--> 35=i
		} else if(MsgType.BUSINESS_MESSAGE_REJECT.equals(msgType)) {
			processBusinessMessageReject(message, sessionID, eventType); //--> 35=j
		} else if(MsgType.BID_REQUEST.equals(msgType)) {
			processBidRequest(message, sessionID, eventType); //--> 35=k
		} else if(MsgType.BID_RESPONSE.equals(msgType)) {
			processBidResponse(message, sessionID, eventType); //--> 35=l
		} else if(MsgType.LIST_STRIKE_PRICE.equals(msgType)) {
			processListStrikePrice(message, sessionID, eventType); //--> 35=m
		} else if(MsgType.XML_MESSAGE.equals(msgType)) {
			processXmlMessage(message, sessionID, eventType); //--> 35=n
		} else if(MsgType.REGISTRATION_INSTRUCTIONS.equals(msgType)) {
			processRegistrationInstructions(message, sessionID, eventType); //--> 35=o
		} else if(MsgType.REGISTRATION_INSTRUCTIONS_RESPONSE.equals(msgType)) {
			processRegistrationInstructionsResponse(message, sessionID, eventType); //--> 35=p
		} else if(MsgType.ORDER_MASS_CANCEL_REQUEST.equals(msgType)) {
			processOrderMassCancelRequest(message, sessionID, eventType); //--> 35=q
		} else if(MsgType.ORDER_MASS_CANCEL_REPORT.equals(msgType)) {
			processOrderMassCancelReport(message, sessionID, eventType); //--> 35=r
		} else if(MsgType.NEW_ORDER_CROSS.equals(msgType)) {
			processNewOrderCross(message, sessionID, eventType); //--> 35=s
		} else if(MsgType.CROSS_ORDER_CANCEL_REPLACE_REQUEST.equals(msgType)) {
			processCrossOrderCancelReplaceRequest(message, sessionID, eventType); //--> 35=t
		} else if(MsgType.CROSS_ORDER_CANCEL_REQUEST.equals(msgType)) {
			processCrossOrderCancelRequest(message, sessionID, eventType); //--> 35=u
		} else if(MsgType.SECURITY_TYPE_REQUEST.equals(msgType)) {
			processSecurityTypeRequest(message, sessionID, eventType); //--> 35=v
		} else if(MsgType.SECURITY_TYPES.equals(msgType)) {
			processSecurityTypes(message, sessionID, eventType); //--> 35=w
		} else if(MsgType.SECURITY_LIST_REQUEST.equals(msgType)) {
			processSecurityListRequest(message, sessionID, eventType); //--> 35=x
		} else if(MsgType.SECURITY_LIST.equals(msgType)) {
			processSecurityList(message, sessionID, eventType); //--> 35=y
		} else if(MsgType.DERIVATIVE_SECURITY_LIST_REQUEST.equals(msgType)) {
			processDerivativeSecurityListRequest(message, sessionID, eventType); //--> 35=z
		} else if(MsgType.DERIVATIVE_SECURITY_LIST.equals(msgType)) {
			processDerivativeSecurityList(message, sessionID, eventType); //--> 35=AA
		} else if(MsgType.NEW_ORDER_MULTILEG.equals(msgType)) {
			processNewOrderMultileg(message, sessionID, eventType); //--> 35=AB
		} else if(MsgType.MULTILEG_ORDER_CANCEL_REPLACE.equals(msgType)) {
			processMultilegOrderCancelReplace(message, sessionID, eventType); //--> 35=AC
		} else if(MsgType.TRADE_CAPTURE_REPORT_REQUEST.equals(msgType)) {
			processTradeCaptureReportRequest(message, sessionID, eventType); //--> 35=AD
		} else if(MsgType.TRADE_CAPTURE_REPORT.equals(msgType)) {
			processTradeCaptureReport(message, sessionID, eventType); //--> 35=AE
		} else if(MsgType.ORDER_MASS_STATUS_REQUEST.equals(msgType)) {
			processOrderMassStatusRequest(message, sessionID, eventType); //--> 35=AF
		} else if(MsgType.QUOTE_REQUEST_REJECT.equals(msgType)) {
			processQuoteRequestReject(message, sessionID, eventType); //--> 35=AG
		} else if(MsgType.RFQ_REQUEST.equals(msgType)) {
			processRfqRequest(message, sessionID, eventType); //--> 35=AH
		} else if(MsgType.QUOTE_STATUS_REPORT.equals(msgType)) {
			processQuoteStatusReport(message, sessionID, eventType); //--> 35=AI
		} else if(MsgType.QUOTE_RESPONSE.equals(msgType)) {
			processQuoteResponse(message, sessionID, eventType); //--> 35=AJ
		} else if(MsgType.CONFIRMATION.equals(msgType)) {
			processConfirmation(message, sessionID, eventType); //--> 35=AK
		} else if(MsgType.POSITION_MAINTENANCE_REQUEST.equals(msgType)) {
			processPositionMaintenanceRequest(message, sessionID, eventType); //--> 35=AL
		} else if(MsgType.POSITION_MAINTENANCE_REPORT.equals(msgType)) {
			processPositionMaintenanceReport(message, sessionID, eventType); //--> 35=AM
		} else if(MsgType.REQUEST_FOR_POSITIONS.equals(msgType)) {
			processRequestForPositions(message, sessionID, eventType); //--> 35=AN
		} else if(MsgType.REQUEST_FOR_POSITIONS_ACK.equals(msgType)) {
			processRequestForPositionsAck(message, sessionID, eventType); //--> 35=AO
		} else if(MsgType.POSITION_REPORT.equals(msgType)) {
			processPositionReport(message, sessionID, eventType); //--> 35=AP
		} else if(MsgType.TRADE_CAPTURE_REPORT_REQUEST_ACK.equals(msgType)) {
			processTradeCaptureReportRequestAck(message, sessionID, eventType); //--> 35=AQ
		} else if(MsgType.TRADE_CAPTURE_REPORT_ACK.equals(msgType)) {
			processTradeCaptureReportAck(message, sessionID, eventType); //--> 35=AR
		} else if(MsgType.ALLOCATION_REPORT.equals(msgType)) {
			processAllocationReport(message, sessionID, eventType); //--> 35=AS
		} else if(MsgType.ALLOCATION_REPORT_ACK.equals(msgType)) {
			processAllocationReportAck(message, sessionID, eventType); //--> 35=AT
		} else if(MsgType.CONFIRMATION_ACK.equals(msgType)) {
			processConfirmationAck(message, sessionID, eventType); //--> 35=AU
		} else if(MsgType.SETTLEMENT_INSTRUCTION_REQUEST.equals(msgType)) {
			processSettlementInstructionRequest(message, sessionID, eventType); //--> 35=AV
		} else if(MsgType.ASSIGNMENT_REPORT.equals(msgType)) {
			processAssignmentReport(message, sessionID, eventType); //--> 35=AW
		} else if(MsgType.COLLATERAL_REQUEST.equals(msgType)) {
			processCollateralRequest(message, sessionID, eventType); //--> 35=AX
		} else if(MsgType.COLLATERAL_ASSIGNMENT.equals(msgType)) {
			processCollateralAssignment(message, sessionID, eventType); //--> 35=AY
		} else if(MsgType.COLLATERAL_RESPONSE.equals(msgType)) {
			processCollateralResponse(message, sessionID, eventType); //--> 35=AZ
		} else if(MsgType.COLLATERAL_REPORT.equals(msgType)) {
			processCollateralReport(message, sessionID, eventType); //--> 35=BA
		} else if(MsgType.COLLATERAL_INQUIRY.equals(msgType)) {
			processCollateralInquiry(message, sessionID, eventType); //--> 35=BB
		} else if(MsgType.NETWORK_STATUS_REQUEST.equals(msgType)) {
			processNetworkStatusRequest(message, sessionID, eventType); //--> 35=BC
		} else if(MsgType.NETWORK_STATUS_RESPONSE.equals(msgType)) {
			processNetworkStatusResponse(message, sessionID, eventType); //--> 35=BD
		} else if(MsgType.USER_REQUEST.equals(msgType)) {
			processUserRequest(message, sessionID, eventType); //--> 35=BE
		} else if(MsgType.USER_RESPONSE.equals(msgType)) {
			processUserResponse(message, sessionID, eventType); //--> 35=BF
		} else if(MsgType.COLLATERAL_INQUIRY_ACK.equals(msgType)) {
			processCollateralInquiryAck(message, sessionID, eventType); //--> 35=BG
		} else if(MsgType.CONFIRMATION_REQUEST.equals(msgType)) {
			processConfirmationRequest(message, sessionID, eventType); //--> 35=BH
		} else if(MsgType.TRADING_SESSION_LIST_REQUEST.equals(msgType)) {
			processTradingSessionListRequest(message, sessionID, eventType); //--> 35=BI
		} else if(MsgType.TRADING_SESSION_LIST.equals(msgType)) {
			processTradingSessionList(message, sessionID, eventType); //--> 35=BJ
		} else if(MsgType.SECURITY_LIST_UPDATE_REPORT.equals(msgType)) {
			processSecurityListUpdateReport(message, sessionID, eventType); //--> 35=BK
		} else if(MsgType.ADJUSTED_POSITION_REPORT.equals(msgType)) {
			processAdjustedPositionReport(message, sessionID, eventType); //--> 35=BL
		} else if(MsgType.ALLOCATION_INSTRUCTION_ALERT.equals(msgType)) {
			processAllocationInstructionAlert(message, sessionID, eventType); //--> 35=BM
		} else if(MsgType.EXECUTION_ACKNOWLEDGEMENT.equals(msgType)) {
			processExecutionAcknowledgement(message, sessionID, eventType); //--> 35=BN
		} else if(MsgType.CONTRARY_INTENTION_REPORT.equals(msgType)) {
			processContraryIntentionReport(message, sessionID, eventType); //--> 35=BO
		} else if(MsgType.SECURITY_DEFINITION_UPDATE_REPORT.equals(msgType)) {
			processSecurityDefinitionUpdateReport(message, sessionID, eventType); //--> 35=BP
		} else {
		    processUnknownMessage(message, sessionID, eventType); //--> Unknown Message
		}
	}
	
	public abstract void processOnCreate(SessionID sessionID);
	
	public abstract void processOnLogon(SessionID sessionID);
	
	public abstract void processOnLogout(SessionID sessionID);
	
	/**
	 * 
	 * [35=0] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processHeartbeat(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=1] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTestRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=2] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processResendRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=3] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processReject(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=4] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSequenceReset(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=5] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processLogout(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=6] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processIndicationOfInterest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=7] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAdvertisement(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=8] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processExecutionReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=9] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderCancelReject(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=A] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processLogon(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=B] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processNews(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=C] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processEmail(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=D] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderSingle(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=E] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderList(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=F] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderCancelRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=G] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderCancelReplaceRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=H] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderStatusRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=J] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAllocationInstruction(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=K] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processListCancelRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=L] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processListExecute(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=M] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processListStatusRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=N] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processListStatus(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=P] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAllocationInstructionAck(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=Q] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processDontKnowTrade(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=R] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processQuoteRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=S] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processQuote(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=T] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSettlementInstructions(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=V] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processMarketDataRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=W] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processMarketDataSnapshotFullRefresh(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=X] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processMarketDataIncrementalRefresh(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=Y] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processMarketDataRequestReject(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=Z] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processQuoteCancel(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=a] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processQuoteStatusRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=b] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processMassQuoteAcknowledgement(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=c] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityDefinitionRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=d] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityDefinition(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=e] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityStatusRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=f] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityStatus(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=g] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradingSessionStatusRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=h] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradingSessionStatus(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=i] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processMassQuote(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=j] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processBusinessMessageReject(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=k] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processBidRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=l] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processBidResponse(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=m] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processListStrikePrice(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=n] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processXmlMessage(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=o] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processRegistrationInstructions(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=p] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processRegistrationInstructionsResponse(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=q] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderMassCancelRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=r] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderMassCancelReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=s] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processNewOrderCross(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=t] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCrossOrderCancelReplaceRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=u] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCrossOrderCancelRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=v] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityTypeRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=w] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityTypes(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=x] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityListRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=y] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityList(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=z] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processDerivativeSecurityListRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AA] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processDerivativeSecurityList(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AB] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processNewOrderMultileg(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AC] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processMultilegOrderCancelReplace(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AD] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradeCaptureReportRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AE] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradeCaptureReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AF] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processOrderMassStatusRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AG] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processQuoteRequestReject(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AH] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processRfqRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AI] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processQuoteStatusReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AJ] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processQuoteResponse(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AK] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processConfirmation(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AL] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processPositionMaintenanceRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AM] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processPositionMaintenanceReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AN] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processRequestForPositions(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AO] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processRequestForPositionsAck(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AP] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processPositionReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AQ] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradeCaptureReportRequestAck(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AR] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradeCaptureReportAck(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AS] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAllocationReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AT] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAllocationReportAck(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AU] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processConfirmationAck(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AV] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSettlementInstructionRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AW] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAssignmentReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AX] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCollateralRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AY] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCollateralAssignment(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=AZ] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCollateralResponse(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BA] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCollateralReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BB] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCollateralInquiry(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BC] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processNetworkStatusRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BD] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processNetworkStatusResponse(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BE] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processUserRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BF] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processUserResponse(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BG] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processCollateralInquiryAck(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BH] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processConfirmationRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BI] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradingSessionListRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BJ] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processTradingSessionList(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BK] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityListUpdateReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BL] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAdjustedPositionReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BM] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processAllocationInstructionAlert(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BN] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processExecutionAcknowledgement(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BO] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processContraryIntentionReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

	/**
	 * 
	 * [35=BP] Message process.
	 * 
	 * @param message
	 * @param sessionID
	 * @param eventType
	 * @throws FieldNotFound
	 */
	public abstract void processSecurityDefinitionUpdateReport(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;
	
	   /**
     * 
     * Unknown Message process.
     * 
     * @param message
     * @param sessionID
     * @param eventType
     * @throws FieldNotFound
     */
    public abstract void processUnknownMessage(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound;

}

 

 

 

myfix.core.application.ApplicationAdapter.java

 

package myfix.core.application;

import quickfix.FieldNotFound;
import quickfix.Message;
import quickfix.SessionID;

/**
 * @author Tacyuuhon
 *
 */
public class ApplicationAdapter extends AbstractApplication {

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAdjustedPositionReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAdjustedPositionReport(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAdvertisement(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAdvertisement(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAllocationInstruction(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAllocationInstruction(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAllocationInstructionAck(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAllocationInstructionAck(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAllocationInstructionAlert(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAllocationInstructionAlert(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAllocationReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAllocationReport(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAllocationReportAck(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAllocationReportAck(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processAssignmentReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processAssignmentReport(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processBidRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processBidRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processBidResponse(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processBidResponse(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processBusinessMessageReject(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processBusinessMessageReject(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCollateralAssignment(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCollateralAssignment(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCollateralInquiry(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCollateralInquiry(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCollateralInquiryAck(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCollateralInquiryAck(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCollateralReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCollateralReport(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCollateralRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCollateralRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCollateralResponse(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCollateralResponse(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processConfirmation(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processConfirmation(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processConfirmationAck(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processConfirmationAck(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processConfirmationRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processConfirmationRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processContraryIntentionReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processContraryIntentionReport(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCrossOrderCancelReplaceRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCrossOrderCancelReplaceRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processCrossOrderCancelRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processCrossOrderCancelRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processDerivativeSecurityList(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processDerivativeSecurityList(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processDerivativeSecurityListRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processDerivativeSecurityListRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processDontKnowTrade(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processDontKnowTrade(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processEmail(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processEmail(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processExecutionAcknowledgement(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processExecutionAcknowledgement(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processExecutionReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processExecutionReport(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processHeartbeat(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processHeartbeat(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processIndicationOfInterest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processIndicationOfInterest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processListCancelRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processListCancelRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processListExecute(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processListExecute(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processListStatus(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processListStatus(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processListStatusRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processListStatusRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processListStrikePrice(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processListStrikePrice(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processLogon(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processLogon(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processLogout(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processLogout(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processMarketDataIncrementalRefresh(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processMarketDataIncrementalRefresh(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processMarketDataRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processMarketDataRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processMarketDataRequestReject(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processMarketDataRequestReject(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processMarketDataSnapshotFullRefresh(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processMarketDataSnapshotFullRefresh(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processMassQuote(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processMassQuote(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processMassQuoteAcknowledgement(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processMassQuoteAcknowledgement(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processMultilegOrderCancelReplace(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processMultilegOrderCancelReplace(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processNetworkStatusRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processNetworkStatusRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processNetworkStatusResponse(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processNetworkStatusResponse(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processNewOrderCross(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processNewOrderCross(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processNewOrderMultileg(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processNewOrderMultileg(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processNews(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processNews(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOnCreate(quickfix.SessionID)
	 */
	@Override
	public void processOnCreate(SessionID sessionID) {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOnLogon(quickfix.SessionID)
	 */
	@Override
	public void processOnLogon(SessionID sessionID) {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOnLogout(quickfix.SessionID)
	 */
	@Override
	public void processOnLogout(SessionID sessionID) {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderCancelReject(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderCancelReject(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderCancelReplaceRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderCancelReplaceRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderCancelRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderCancelRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderList(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderList(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderMassCancelReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderMassCancelReport(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderMassCancelRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderMassCancelRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderMassStatusRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderMassStatusRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderSingle(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderSingle(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processOrderStatusRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processOrderStatusRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processPositionMaintenanceReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processPositionMaintenanceReport(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processPositionMaintenanceRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processPositionMaintenanceRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processPositionReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processPositionReport(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processQuote(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processQuote(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processQuoteCancel(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processQuoteCancel(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processQuoteRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processQuoteRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processQuoteRequestReject(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processQuoteRequestReject(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processQuoteResponse(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processQuoteResponse(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processQuoteStatusReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processQuoteStatusReport(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processQuoteStatusRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processQuoteStatusRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processRegistrationInstructions(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processRegistrationInstructions(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processRegistrationInstructionsResponse(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processRegistrationInstructionsResponse(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processReject(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processReject(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processRequestForPositions(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processRequestForPositions(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processRequestForPositionsAck(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processRequestForPositionsAck(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processResendRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processResendRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processRfqRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processRfqRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityDefinition(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityDefinition(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityDefinitionRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityDefinitionRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityDefinitionUpdateReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityDefinitionUpdateReport(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityList(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityList(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityListRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityListRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityListUpdateReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityListUpdateReport(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityStatus(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityStatus(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityStatusRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityStatusRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityTypeRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityTypeRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSecurityTypes(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSecurityTypes(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSequenceReset(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSequenceReset(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSettlementInstructionRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSettlementInstructionRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processSettlementInstructions(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processSettlementInstructions(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTestRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTestRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradeCaptureReport(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradeCaptureReport(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradeCaptureReportAck(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradeCaptureReportAck(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradeCaptureReportRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradeCaptureReportRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradeCaptureReportRequestAck(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradeCaptureReportRequestAck(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradingSessionList(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradingSessionList(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradingSessionListRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradingSessionListRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradingSessionStatus(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradingSessionStatus(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processTradingSessionStatusRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processTradingSessionStatusRequest(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processUserRequest(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processUserRequest(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processUserResponse(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processUserResponse(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
	 * @see myfix.core.application.AbstractApplication#processXmlMessage(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
	 */
	@Override
	public void processXmlMessage(Message message, SessionID sessionID,
			EventType eventType) throws FieldNotFound {
		
		
	}

	/* (non-Javadoc)
     * @see myfix.core.application.AbstractApplication#processUnknownMessage(quickfix.Message, quickfix.SessionID, myfix.core.application.EventType)
     */
    @Override
    public void processUnknownMessage(Message message, SessionID sessionID,
            EventType eventType) throws FieldNotFound {
        
    }

}

 

 

 

myfix.core.application.EventType.java

 

package myfix.core.application;

/**
 * @author Tacyuuhon
 *
 */
public enum EventType {

	/**
	 * fromAdmin事件标识符
	 */
	FROM_ADMIN,
	
	/**
	 * fromApp事件标识符
	 */
	FROM_APP,
	
	/**
	 * toAdmin事件标识符
	 */
	TO_ADMIN,
	
	/**
	 * toApp事件标识符
	 */
	TO_APP,
}

 

 

AcceptorStartup.java

 

package myfix.demo.acceptor;

import myfix.common.LoggerWapper;
import myfix.demo.acceptor.launcher.AcceptorLauncher;
import quickfix.ConfigError;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class AcceptorStartup {

	public static void main(String[] args) throws ConfigError {
		LoggerWapper.traceCallStart();
		
		AcceptorLauncher.getInstance().launch();
		
		LoggerWapper.traceCallEnd();
	}

}

 

 

 

myfix.demo.acceptor.launcher.AcceptorApplication.java

 

package myfix.demo.acceptor.application;

import java.util.List;

import myfix.common.LoggerWapper;
import myfix.common.MessageCreateFactory;
import myfix.core.application.ApplicationAdapter;
import myfix.core.application.EventType;
import myfix.demo.acceptor.rate.RateGenerater;
import myfix.demo.acceptor.rate.RateSender;
import quickfix.FieldNotFound;
import quickfix.Group;
import quickfix.Message;
import quickfix.SessionID;
import quickfix.field.MDReqID;
import quickfix.field.MsgType;
import quickfix.field.NoRelatedSym;
import quickfix.field.Symbol;
import quickfix.field.UserRequestID;
import quickfix.field.UserStatus;
import quickfix.field.Username;
import quickfix.fix44.MarketDataRequest;
import quickfix.fix44.UserRequest;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class AcceptorApplication extends ApplicationAdapter {
	
	@Override
	public void processUserRequest(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound {
		LoggerWapper.traceCallStart();
		LoggerWapper.debug("processUserRequest(message,sessionID,eventType) : " + "["+message + " , " + sessionID + " , " + eventType + "]");
		
		if(EventType.FROM_APP.equals(eventType)) {
			
			UserRequest userRequest = MessageCreateFactory.cast(message, UserRequest.class);
			String userRequestID = userRequest.getString(UserRequestID.FIELD);
			String username = userRequest.getString(Username.FIELD);

			Message userResponse = MessageCreateFactory.createMessage(sessionID,MsgType.USER_RESPONSE);
	
			userResponse.setString(UserRequestID.FIELD, userRequestID);
			userResponse.setString(Username.FIELD, username);
			userResponse.setInt(UserStatus.FIELD, 1);
			
			sendMessage(userResponse, sessionID);
		}
		
		LoggerWapper.traceCallEnd();
	}

	@Override
	public void processMarketDataRequest(Message message, final SessionID sessionID, EventType eventType) throws FieldNotFound {
		LoggerWapper.traceCallStart();
		LoggerWapper.debug("processMarketDataRequest(message,sessionID,eventType) : " + "["+message + " , " + sessionID + " , " + eventType + "]");

		if(EventType.FROM_APP.equals(eventType)) {
			MarketDataRequest marketDataRequest = MessageCreateFactory.cast(message, MarketDataRequest.class);
			
			MDReqID mdReqID = marketDataRequest.get(new MDReqID());
			Symbol symbol = null;
			List<Group> NoRelatedSymList = marketDataRequest.getGroups(NoRelatedSym.FIELD);
			if(!NoRelatedSymList.isEmpty()) {
				Group group = NoRelatedSymList.get(0);
				symbol = new Symbol(group.getString(Symbol.FIELD));
			}
			
			RateGenerater rateGenerater = new RateGenerater(mdReqID, symbol);
			RateSender rateSender = new RateSender(rateGenerater, new RateSender.SendEvent() {
				
				public void onSend(Message message) {
					sendMessage(message,sessionID);
				}
			});
			new Thread(rateSender).start();
		}
		
		LoggerWapper.traceCallEnd();
	}

}

 

 

 

myfix.demo.acceptor.launcher.AcceptorLauncher.java

 

package myfix.demo.acceptor.launcher;

import java.io.InputStream;

import myfix.common.LoggerWapper;
import myfix.demo.acceptor.application.AcceptorApplication;
import quickfix.Acceptor;
import quickfix.ConfigError;
import quickfix.DefaultMessageFactory;
import quickfix.FileStoreFactory;
import quickfix.LogFactory;
import quickfix.MessageFactory;
import quickfix.MessageStoreFactory;
import quickfix.SLF4JLogFactory;
import quickfix.SessionSettings;
import quickfix.SocketAcceptor;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class AcceptorLauncher {

	private final static AcceptorLauncher launcher = new AcceptorLauncher();
	private final static String CONF_FILE_PATH = "/conf/demo/acceptor.conf";
	
	private AcceptorLauncher() {
		LoggerWapper.traceCallStart();
		
		LoggerWapper.traceCallEnd();
	}
	
	public static AcceptorLauncher getInstance() {
		LoggerWapper.traceCallStart();
		
		
		LoggerWapper.traceCallEnd();
		return launcher;
	}
	
	public void launch() throws ConfigError {
		LoggerWapper.traceCallStart();
		
		InputStream in = this.getClass().getResourceAsStream(CONF_FILE_PATH);
		SessionSettings settings = new SessionSettings(in);
        MessageStoreFactory messageStoreFactory = new FileStoreFactory(settings);
        LogFactory logFactory = new SLF4JLogFactory(settings);
        MessageFactory messageFactory = new DefaultMessageFactory();
        
        Acceptor acceptor = new SocketAcceptor(new AcceptorApplication(), messageStoreFactory, settings, logFactory, messageFactory);
        acceptor.start();
		
		LoggerWapper.traceCallEnd();
	}
}

 

 

 

myfix.demo.acceptor.rate.RateGenerater.java

 

package myfix.demo.acceptor.rate;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import myfix.common.MessageCreateFactory;
import quickfix.Message;
import quickfix.field.MDEntryPx;
import quickfix.field.MDEntryType;
import quickfix.field.MDReqID;
import quickfix.field.NoMDEntries;
import quickfix.field.QuoteEntryID;
import quickfix.field.Symbol;
import quickfix.fix44.MarketDataSnapshotFullRefresh;
import quickfix.fix44.component.Instrument;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class RateGenerater {
	
	private final String MIN_KEY = "_MIN";
	private final String MAX_KEY = "_MAX";

	private final Map<String,Integer> rateRange = new HashMap<String,Integer>() {
		/**
		 * 
		 */
		private static final long serialVersionUID = 1475369029118134623L;
		{
			// USD/JPY Rate range
			put("USD/JPY"+MIN_KEY,80);
			put("USD/JPY"+MAX_KEY,83);
			
			// USD/CHF Rate range
			put("USD/CHF"+MIN_KEY,1);
			put("USD/CHF"+MAX_KEY,10);
			
			// EUR/JPY Rate range
			put("EUR/JPY"+MIN_KEY,100);
			put("EUR/JPY"+MAX_KEY,120);
			
			//****************************//
			
			// XAU/USD Rate range
			put("XAU/USD"+MIN_KEY,1500);
			put("XAU/USD"+MAX_KEY,1900);
			
			// XAG/USD Rate range
			put("XAG/USD"+MIN_KEY,40);
			put("XAG/USD"+MAX_KEY,80);
			
			// OIL/USD Rate range
			put("OIL/USD"+MIN_KEY,13000);
			put("OIL/USD"+MAX_KEY,18000);
			
			
		}
	};
	
	private MDReqID mdReqID = null;
	private Symbol symbol = null;
	private BigDecimal currentVal = new BigDecimal(0);
	private int direction = 1;
	
	public RateGenerater(MDReqID mdReqID, Symbol symbol) {
		this.mdReqID = mdReqID;
		this.symbol = symbol;
	}
	
	public Message generate() {
		Integer minRange = rateRange.get(symbol.getValue()+MIN_KEY);
		Integer maxRange = rateRange.get(symbol.getValue()+MAX_KEY);
		
		if (currentVal.intValue() == 0) {
			currentVal = currentVal.add(new BigDecimal(minRange));
		}
		
		//direction=1为正向加,direction=2为反向减
		
		if (currentVal.compareTo(new BigDecimal(minRange)) <= 0) {
			direction = 1;
		} else if (currentVal.compareTo(new BigDecimal(maxRange)) > 0) {
			direction = 2;
		} 
	
		if (direction == 1) {
			currentVal = currentVal.add(new BigDecimal(0.1));
		} else if (direction == 2) {
			currentVal = currentVal.subtract(new BigDecimal(0.1));
		}
		BigDecimal ask = currentVal.add(new BigDecimal(1));
		BigDecimal bid = currentVal;
		
		MarketDataSnapshotFullRefresh message = MessageCreateFactory.createMessage(MarketDataSnapshotFullRefresh.class);
		message.set(mdReqID);
		message.set(new Instrument(symbol));
		message.set(new NoMDEntries(2));
		
		MarketDataSnapshotFullRefresh.NoMDEntries noMDEntriesGroup = new MarketDataSnapshotFullRefresh.NoMDEntries();
		
		noMDEntriesGroup.set(new MDEntryType( MDEntryType.BID));
		noMDEntriesGroup.set(new MDEntryPx(bid.doubleValue()));
		noMDEntriesGroup.set(new QuoteEntryID(UUID.randomUUID().toString()));
		message.addGroup(noMDEntriesGroup);
		
		noMDEntriesGroup.set(new MDEntryType( MDEntryType.OFFER));
		noMDEntriesGroup.set(new MDEntryPx(ask.doubleValue()));
		noMDEntriesGroup.set(new QuoteEntryID(UUID.randomUUID().toString()));
		message.addGroup(noMDEntriesGroup);
		
		return message;
		
	}
}

 

 

 

myfix.demo.acceptor.rate.RateSender.java

 

package myfix.demo.acceptor.rate;

import myfix.common.LoggerWapper;
import quickfix.Message;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class RateSender implements Runnable {
	
	private RateGenerater rateGenerater = null;
	private SendEvent sendEvent = null;
	
	public RateSender(RateGenerater rateGenerater , SendEvent sendEvent) {
		this.rateGenerater = rateGenerater;
		this.sendEvent = sendEvent;
	}
	
	public static interface SendEvent {
		public void onSend(Message message);
	}

	public void run() {
		while(true) {
			try {
				
				Message message = rateGenerater.generate();
				sendEvent.onSend(message);
				
				Thread.sleep(1000);
			} catch(Exception ex) {
				ex.printStackTrace();
				LoggerWapper.error(ex);
			}
		}
	}

}
 

 

myfix.demo.initiator.InitiatorStartup.java

 

package myfix.demo.initiator;

import myfix.common.LoggerWapper;
import myfix.demo.initiator.launcher.InitiatorLauncher;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class InitiatorStartup {

	public static void main(String[] args) {
		LoggerWapper.traceCallStart();
		InitiatorLauncher.getInstance().launch();
		LoggerWapper.traceCallEnd();
	}

}

 

 

 

myfix.demo.initiator.application.InitiatorApplication.java

 

package myfix.demo.initiator.application;

import java.util.UUID;

import myfix.common.AccountConstant;
import myfix.common.LoggerWapper;
import myfix.common.MessageCreateFactory;
import myfix.core.application.ApplicationAdapter;
import myfix.core.application.EventType;
import quickfix.FieldNotFound;
import quickfix.Message;
import quickfix.SessionID;
import quickfix.field.MDEntryType;
import quickfix.field.MDReqID;
import quickfix.field.MarketDepth;
import quickfix.field.NoRelatedSym;
import quickfix.field.Password;
import quickfix.field.SubscriptionRequestType;
import quickfix.field.Symbol;
import quickfix.field.UserRequestID;
import quickfix.field.UserRequestType;
import quickfix.field.Username;
import quickfix.fix44.MarketDataRequest;
import quickfix.fix44.UserRequest;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class InitiatorApplication extends ApplicationAdapter {
	
	@Override
	public void processOnCreate(SessionID sessionID) {
		LoggerWapper.traceCallStart();
		LoggerWapper.debug("processOnCreate(sessionID) : " + "[" + sessionID + "]");
		LoggerWapper.traceCallEnd();
	}

	@Override
	public void processOnLogon(SessionID sessionID) {
		LoggerWapper.traceCallStart();
		LoggerWapper.debug("processOnLogon(sessionID) : " + "[" + sessionID + "]");
		
		UserRequest userRequest = MessageCreateFactory.createMessage(UserRequest.class);
		userRequest.set(new Username("MyFIX"));
		userRequest.set(new Password("123456"));
		userRequest.set(new UserRequestType(UserRequestType.LOGONUSER));
		userRequest.set(new UserRequestID(UUID.randomUUID().toString()));
		
		sendMessage(userRequest, sessionID);
		
		LoggerWapper.traceCallEnd();
	}

	@Override
	public void processUserResponse(Message message, SessionID sessionID, EventType eventType) throws FieldNotFound {
		LoggerWapper.traceCallStart();
		LoggerWapper.debug("processUserResponse(message,sessionID,eventType) : " + "["+message + " , " + sessionID + " , " + eventType + "]");
		
		if(EventType.FROM_APP.equals(eventType)) {
			
			if(AccountConstant.QUICKFIX_USER1.equals(sessionID.getSenderCompID())) {
				String[] productIDS = new String[]{"USD/JPY","USD/CHF","EUR/JPY"};
				
				for(String productId : productIDS) {
					MarketDataRequest marketDataRequest = new MarketDataRequest();
					marketDataRequest.set(new MDReqID(UUID.randomUUID().toString()));
					marketDataRequest.set(new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES));
					marketDataRequest.set(new MarketDepth(1));
					
					MarketDataRequest.NoMDEntryTypes noMDEntryTypes = new MarketDataRequest.NoMDEntryTypes();
					noMDEntryTypes.set(new MDEntryType(MDEntryType.BID));
					marketDataRequest.addGroup(noMDEntryTypes);
					noMDEntryTypes.set(new MDEntryType(MDEntryType.OFFER));
					marketDataRequest.addGroup(noMDEntryTypes);
					
					MarketDataRequest.NoRelatedSym noRelatedSym = new MarketDataRequest.NoRelatedSym();
					noRelatedSym.set(new Symbol(productId));
					marketDataRequest.addGroup(noRelatedSym);
					marketDataRequest.set(new NoRelatedSym(1));
					
					sendMessage(marketDataRequest, sessionID);
				}
			}
			
			if(AccountConstant.QUICKFIX_USER2.equals(sessionID.getSenderCompID())) {
				String[] productIDS = new String[]{"XAU/USD","XAG/USD","OIL/USD"};
				
				for(String productId : productIDS) {
					MarketDataRequest marketDataRequest = new MarketDataRequest();
					marketDataRequest.set(new MDReqID(UUID.randomUUID().toString()));
					marketDataRequest.set(new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES));
					marketDataRequest.set(new MarketDepth(1));
					
					MarketDataRequest.NoMDEntryTypes noMDEntryTypes = new MarketDataRequest.NoMDEntryTypes();
					noMDEntryTypes.set(new MDEntryType(MDEntryType.BID));
					marketDataRequest.addGroup(noMDEntryTypes);
					noMDEntryTypes.set(new MDEntryType(MDEntryType.OFFER));
					marketDataRequest.addGroup(noMDEntryTypes);
					
					MarketDataRequest.NoRelatedSym noRelatedSym = new MarketDataRequest.NoRelatedSym();
					noRelatedSym.set(new Symbol(productId));
					marketDataRequest.addGroup(noRelatedSym);
					marketDataRequest.set(new NoRelatedSym(1));
					
					sendMessage(marketDataRequest, sessionID);
				}
			}
		}
		LoggerWapper.traceCallEnd();
	}
	@Override
	public void processMarketDataSnapshotFullRefresh(Message message,
			SessionID sessionID, EventType eventType) throws FieldNotFound {
		super.processMarketDataSnapshotFullRefresh(message, sessionID, eventType);
		LoggerWapper.debug("---->>>> " + message);
		RateReceiver.getQueue().offer(message);
	}


}

 

 

 

myfix.demo.initiator.application.RateReceiver.java

 

package myfix.demo.initiator.application;

import java.math.BigDecimal;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

import myfix.common.LoggerWapper;
import myfix.common.MessageCreateFactory;
import quickfix.Message;
import quickfix.field.MDEntryPx;
import quickfix.field.MDEntryType;
import quickfix.field.NoMDEntries;
import quickfix.field.Symbol;
import quickfix.fix44.MarketDataSnapshotFullRefresh;
import quickfix.fix44.component.Instrument;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class RateReceiver implements Runnable {
	
	private final static BlockingQueue<Message> queue = new ArrayBlockingQueue<Message>(1000);

	public void run() {
		try {
			while(true) {
				
				MarketDataSnapshotFullRefresh marketData = MessageCreateFactory.cast(queue.take(), MarketDataSnapshotFullRefresh.class);
				
				Instrument instrument   = MessageCreateFactory.createMessage(Instrument.class);
				
				//String reqID = marketData.getString(MDReqID.FIELD);
				String symbol = marketData.get(instrument).getString(Symbol.FIELD);
				int size = marketData.getInt(NoMDEntries.FIELD);
				
				BigDecimal offer = new BigDecimal(0);
				BigDecimal bid = new BigDecimal(0);
				
				for(int i=1;i<=size;i++) {
					MarketDataSnapshotFullRefresh.NoMDEntries entries = new MarketDataSnapshotFullRefresh.NoMDEntries();
					marketData.getGroup(i, entries);
					
					char side = entries.getChar(MDEntryType.FIELD);
					
					switch (side) {

					case MDEntryType.OFFER:
						offer = BigDecimal.valueOf(entries.getDouble(MDEntryPx.FIELD));
						break;

					case MDEntryType.BID:
						bid = BigDecimal.valueOf(entries.getDouble(MDEntryPx.FIELD));
						break;

					default:
						break;
					}
				}
				
				LoggerWapper.info("Symbol -> " + symbol + " | " + "OFFER -> " + offer.toPlainString() + " | " + "BID -> " + bid.toPlainString());
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public static BlockingQueue<Message> getQueue() {
		return queue;
	}
	

}

 

 

 

myfix.demo.initiator.launcher.InitiatorLauncher.java

 

package myfix.demo.initiator.launcher;

import java.io.InputStream;

import myfix.common.LoggerWapper;
import myfix.demo.initiator.application.InitiatorApplication;
import myfix.demo.initiator.application.RateReceiver;
import quickfix.DefaultMessageFactory;
import quickfix.FileStoreFactory;
import quickfix.Initiator;
import quickfix.LogFactory;
import quickfix.MessageFactory;
import quickfix.MessageStoreFactory;
import quickfix.SLF4JLogFactory;
import quickfix.SessionSettings;
import quickfix.SocketInitiator;

/**
 * 
 * @author Tacyuuhon
 *
 */
public class InitiatorLauncher {

	private final static InitiatorLauncher launcher = new InitiatorLauncher();
	private final static String CONF_FILE_PATH = "/conf/demo/initiator.conf";
	
	private InitiatorLauncher() {
		LoggerWapper.traceCallStart();
		LoggerWapper.traceCallEnd();
	}
	
	public static InitiatorLauncher getInstance() {
		LoggerWapper.traceCallStart();
		LoggerWapper.traceCallEnd();
		return launcher;
	}
	
	public void launch() {
		LoggerWapper.traceCallStart();
		try {
			
	        //
	        RateReceiver rateReceiver = new RateReceiver();
	        Thread receiverThread = new Thread(rateReceiver);
	        receiverThread.start();
			
	        //
			InputStream in = this.getClass().getResourceAsStream(CONF_FILE_PATH);
			SessionSettings settings = new SessionSettings(in);
	        MessageStoreFactory messageStoreFactory = new FileStoreFactory(settings);
	        LogFactory logFactory = new SLF4JLogFactory(settings);
	        MessageFactory messageFactory = new DefaultMessageFactory();
	        
	        //
	        Initiator initiator = new SocketInitiator(new InitiatorApplication(), messageStoreFactory, settings, logFactory, messageFactory);
	        initiator.start();
	        
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		LoggerWapper.traceCallEnd();
	}
}
 

 

分享到:
评论

相关推荐

    FIX tutorial in Java with QuickFIX/j simple example

    QuickFIX/j是QuickFIX家族的一员,是一个开源、跨平台的Java实现,旨在简化FIX消息的处理。本教程将通过一个简单的Java示例介绍如何使用QuickFIX/j来理解和应用FIX协议。 首先,我们需要理解FIX协议的基础。FIX协议...

    QuickFIX 源代码

    QuickFIX,全称为"QuickFIX/J",是一个开源的、跨平台的金融信息交换(FIX)协议实现,专为高效、可靠地处理金融交易而设计。FIX协议是金融业广泛采用的标准,用于在金融机构之间传递订单、报价和其他市场数据。...

    quickfixj:QuickFIXJ是用于FIX协议的全功能消息传递引擎。 -这是官方项目资料库

    QuickFIX / J 这是官方的QuickFIX / J项目存储库。介绍QuickFIX / J是用于FIX协议(FIX版本4.0-5.0SP2 / FIXT1.1)的全功能消息传递引擎。 它是流行的C ++ QuickFIX引擎的100%Java开源实现。 金融信息交换(FIX)...

    quickfix完整代码及Demo

    QuickFix,全称为"Financial Information eXchange"(金融信息交换),是一个开源的、跨平台的C++库,专门用于处理FIX(金融信息交换协议)消息。FIX协议是金融行业中广泛使用的标准通信协议,用于在金融机构之间...

    quickfix:Go中实现的FIX协议库

    QuickFIX /转到 网站: : 邮件列表: Go中实现的开源库 入门和文档 安装 要安装QuickFIX / Go,请使用go get : $ go get github.com/quickfixgo/quickfix 保持最新 要更新QuickFIX / Go到最新版本,请使用go ...

    QuickFIX/J - Open Source Java FIX Engine-开源

    QuickFIX / J是流行的QuickFIX开源FIX协议引擎的100%Java实现。 QuickFIX / J功能包括对FIX协议版本4.0至4.4和5.0 / FIXT1.1(www.fixprotocol.org)的支持。 请注意,SourceForge SVN存储库是只读的。 当前仓库...

    quickfixj-2.2.0.zip

    QuickFIX/J 2.2.0 是一个针对金融行业的开源消息引擎,专门处理基于FIX(Financial Information eXchange)协议的数据交换。FIX协议是全球金融市场广泛采用的标准,用于在金融机构之间传输交易和市场数据。QuickFIX/...

    sslQuickfix:有关基于Quickfix的项目的SSL配置的概念证明

    典型的基于quickfix业务的二进制文件适用于经典Linux服务器。 安装quickfix库 仔细检查您的版本是否最新,足以在内部支持SSL并将其。 最简单的检查Quickfix库 受启发,一个应该测试我们以前的quickfix安装。 从根本...

    使用 MATLAB 进行自动交易 - 2012:来自自动交易网络研讨会的文件显示 X_Trader 和 QuickFIX/J 集成。-matlab开发

    *数据收集选项,包括每日历史数据,日内数据和实时数据* MATLAB 中的模型构建和原型设计* 回测和校准模型*与现有的库和软件进行交互以执行交易(X_Trader,QuickFIX / J,消息队列) 建议您观看网络研讨会以了解...

    QuickFix 实现代码例子

    QuickFix 是一个开源的金融信息交换(FIX)协议实现库,专为交易系统设计,用于高效、可靠地传输证券和衍生品交易相关的数据。FIX 协议是一种国际标准,广泛应用于金融机构之间,包括股票、债券、期货、期权等各种...

    quickfix, 在Go中,修复协议库.zip

    quickfix, 在Go中,修复协议库 quickfix 网站:http://www.quickfixgo.org邮件列表:GoogleGo中实现的开源修复协议库入门和文档用户手册API文档安装要安装 quickfix/围棋,请使用 go g

    quickfixn:QuickFIXn在.NET上实现FIX协议

    有关如何使用QuickFIX / n的教程,请访问。 本自述文件是关于设置系统以进行QuickFIX / n开发的。 系统设置 该项目需要以下内容: 生成并运行测试 (用于从DataDictionary xml文件生成消息和字段类) 从命令行:...

    QuickFix协议

    QuickFix协议,全称为"Quick Financial Information eXchange",是一种专为金融行业设计的、开源的、高速的、可靠的报文传输协议。它在银行和外汇交易领域中广泛应用,旨在提高交易效率,减少错误,并确保交易数据的...

    quickfix-1.14.3 64位

    QuickFix(快速修复)是金融行业的标准通信协议,用于在交易机构之间交换金融消息,如订单、确认、报告等。QuickFIX(或简称FIX)是一个开源实现,它提供了多种编程语言的支持,包括Python。"quickfix-1.14.3 64位...

    java源码交易-FIXimulator:FIXimulator是基于Java的FIX交易应用程序,基于开源QuickFIX/JFIX引擎构建

    FIXimulator是一款基于Java开发的FIX(Financial Information eXchange)交易模拟器,它利用了开源的QuickFIX/J库,这是FIX协议的一个强大的Java实现。FIX协议是一种广泛用于金融市场的通信协议,用于在金融机构之间...

    quickfixn-v1.5.0的dll

    开发quickfix所需要的dll引用 官方的DLL

    C# quickfix 例子以及源代码

    QuickFix(快速修复)是一个广泛使用的金融消息协议库,它主要设计用来处理FIX(金融信息交换)协议。在C#中,QuickFixN是QuickFix的.NET版本,它为.NET开发者提供了一种处理金融交易消息的高效方式。本文将深入探讨...

    quick fix tester

    "Quick Fix Tester" 是一个基于 Quick Fix 框架用于测试步骤协议的工具,它的设计目的是为了方便且高效地验证金融交易中的消息传递协议。这个项目可能是为了教学或娱乐目的而创建的一个实例。 Quick Fix(快速修复...

Global site tag (gtag.js) - Google Analytics