fix协议介绍3-登出消息
2013-12-12 14:53
295 查看
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
Field or Component | Field Name | FIXML name | Req'd | Comments | Depr. |
---|
Component | StandardHeader | BaseHeader | MsgType = 5 |
1409 | SessionStatus | @SessStat | Session status at time of logout. | |||
58 | Text | @Txt | ||||
354 | EncodedTextLen | @EncTxtLen | Must be set if EncodedText field is specified and must immediately precede it. | |||
355 | EncodedText | @EncTxt | Encoded (non-ASCII characters) representation of the Text field in the encoded format specified via the MessageEncoding field. |
Component | StandardTrailer |
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); } @Override public void decodeBody() { } @Override public 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; } }
处理逻辑:略
相关文章推荐
- fix协议介绍8-Reject消息
- fix协议介绍5-测试消息
- fix协议介绍6-重发消息
- fix协议介绍2-登入消息
- 【转】关于TCP和UDP协议消息保护边界的介绍
- fix协议介绍9-下单(NewOrderSingle)
- Fix协议介绍10-取消订单请求(OrderCancelRequest)
- 消息处理利器 ActiveMQ 的介绍 & Stomp 协议的使用
- fix协议封装挑战-将消息字符串解析为实体
- fix协议介绍11-修改订单(OrderCacelReplaceRequest)
- [中间件] 消息处理利器 ActiveMQ 的介绍 & Stomp 协议的使用
- fix协议介绍14-批量取消订单(OrderMassCancelRequest)
- fix协议介绍12-取消订单被拒(OrderCacelReject)
- fix协议介绍15-批量取消订单执行报告(OrderMassCancelReport)
- fix协议介绍13-执行报告(ExecutionReport)
- fix协议介绍16-查询叮当(quote)
- [中间件] 消息处理利器 ActiveMQ 的介绍 & Stomp 协议的使用
- fix协议介绍17-查询订单状态报告(QuoteStateReport)
- fix协议介绍18-取消查询订单(QuoteCancel)
- Fix协议封装挑战-消息处理