fix协议介绍3-登出消息
来源:互联网 发布:分布式更新数据 编辑:程序博客网 时间:2024/05/26 20:21
FIX.5.0SP2_EP168 Message
Logout [type '5']
The logout message initiates or confirms the termination of a FIX session. Disconnection without the exchange of logout messages should be interpreted as an abnormal condition.
Added FIX.2.7
Expand Components | Collapse Components
MsgType = 5
1409SessionStatus@SessStatSession status at time of logout.
58Text@Txt 354EncodedTextLen@EncTxtLenMust be set if EncodedText field is specified and must immediately precede it.
355EncodedText@EncTxtEncoded (non-ASCII characters) representation of the Text field in the encoded format specified via the MessageEncoding field.
ComponentStandardTrailer封装例子:
package cs.mina.codec.msg;import java.util.HashSet;import java.util.List;import java.util.Set;/* *@author(huangxiaoping) *@date 2013-11-25 */public class LogoutMsg extends BaseMsg {private Tag text=new Tag("58","String",false);private Tag encodedTextLen=new Tag("354","Length",false);private Tag encodedText=new Tag("355","data",false);private Set<String> tagIdsSet=new HashSet<String>();public LogoutMsg(){tagIdsSet.add("58");tagIdsSet.add("354");tagIdsSet.add("355");this.bodyEntity.getBodyTagList().add(text);this.bodyEntity.getBodyTagList().add(encodedTextLen);this.bodyEntity.getBodyTagList().add(encodedText);}@Overridepublic void decodeBody() {}@Overridepublic void validate() {if(encodedText.getTagValue()!=null){encodedTextLen.setMust(true);}this.headEntity.validate();List<Tag> bodyTagList=this.bodyEntity.getBodyTagList();for(int i=0;i<bodyTagList.size();i++){bodyTagList.get(i).validate();}this.tailerEntity.validate();}public Tag getText() {return text;}public void setText(Tag text) {this.text = text;}public Tag getEncodedTextLen() {return encodedTextLen;}public void setEncodedTextLen(Tag encodedTextLen) {this.encodedTextLen = encodedTextLen;}public Tag getEncodedText() {return encodedText;}public void setEncodedText(Tag encodedText) {this.encodedText = encodedText;}public Set<String> getTagIdsSet() {return tagIdsSet;}public void setTagIdsSet(Set<String> tagIdsSet) {this.tagIdsSet = tagIdsSet;}}
处理逻辑:略
0 0
- fix协议介绍3-登出消息
- fix协议介绍2-登入消息
- fix协议介绍5-测试消息
- fix协议介绍6-重发消息
- fix协议介绍8-Reject消息
- fix协议介绍-常用资源
- fix协议介绍4-心跳
- fix协议介绍20-TradeCaptureReportAck
- Fix协议封装挑战-消息处理
- fix协议中消息尾校验方法
- fix协议介绍7-序列号重置
- fix协议封装挑战-将消息字符串解析为实体
- fix协议介绍9-下单(NewOrderSingle)
- Fix协议介绍10-取消订单请求(OrderCancelRequest)
- fix协议介绍11-修改订单(OrderCacelReplaceRequest)
- fix协议介绍12-取消订单被拒(OrderCacelReject)
- fix协议介绍13-执行报告(ExecutionReport)
- fix协议介绍14-批量取消订单(OrderMassCancelRequest)
- C# 冒泡排序算法
- Java图片上传代码
- 获取网络地址
- Sql Server中用Print命令轻松调试【存储过程】的技巧或经验!
- Nignx日志统计分析
- fix协议介绍3-登出消息
- 简要介绍分布式服务器系统的内部结构
- 对DSP中unsigned long的发现以及对各种变量类型的总结
- EXT复合表头谷歌浏览器Chrome错位解决办法
- memcached实现分布式数据存储
- VS2012配置QT5环境
- Java中的集合
- 我要我们一直在一起
- 让UITableView响应touch事件