Fix协议封装挑战-消息处理

消息处理还没正式开始写,有待完善:

处理器工厂如下:

package cs.mina.client.handler;

import java.util.HashMap;
import java.util.Map;

/*
 *@author(huangxiaoping)
 *@date 2013-10-11
 */
public class ClientHandlerFactory {
	private static Map<String, ClientMessageHandler> handlerMap=new HashMap<String,ClientMessageHandler>();
	static{
		handlerMap.put("0", new HeartbeatMessageHandler());
		handlerMap.put("5", new LogoutMessageHandler());
		handlerMap.put("4", new SequenceResetMessageHandler());
		handlerMap.put("A", new LogonMessageHandler());
		handlerMap.put("1", new TestRequestMessageHandler());
		handlerMap.put("2", new ResendRequestMessageHandler());
		handlerMap.put("3", new RejectMessageHandler());
		handlerMap.put("8", new ExecutionReportMessageHandler());
		handlerMap.put("9", new OrderCancelRejectMessageHandler());
		handlerMap.put("r", new OrderMassCancelReportMessageHandler());
		handlerMap.put("AI", new QuoteStatusReportMessageHandler());
		handlerMap.put("AE", new TradeCaptureReportMessageHandler());
		handlerMap.put("AR", new TradeCaptureReportAckMessageHandler());
		handlerMap.put("j", new BusinessMessageRejectMessageHandler());
		handlerMap.put("CV", new PartyEntitlementReportMessageHandler());
	}
	
	public static ClientMessageHandler getHandler(String key){
		return handlerMap.get(key);
	}
}


阅读更多

扫码向博主提问

去开通我的Chat快问

hxpjava1

非学,无以致疑;非问,无以广识
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hxpjava1/article/details/17094035
个人分类: java web fix
所属专栏: fix协议实战
想对作者说点什么? 我来说一句

fix协议接口示例

2013年09月30日 5.17MB 下载

没有更多推荐了,返回首页

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭