|
FIX 4.0 Demo 1.0
|
会话状态处理器接口(状态模式) More...
#include <session.hpp>


Public Member Functions | |
| virtual | ~IStateHandler ()=default |
| virtual void | onMessageReceived (Session &context, const FixMessage &msg)=0 |
| 处理收到的消息 | |
| virtual void | onTimerCheck (Session &context)=0 |
| 处理定时器检查事件 | |
| virtual void | onSessionStart (Session &context)=0 |
| 处理会话启动事件 | |
| virtual void | onLogoutRequest (Session &context, const std::string &reason)=0 |
| 处理登出请求 | |
| virtual const char * | getStateName () const =0 |
| 获取状态名称 | |
会话状态处理器接口(状态模式)
定义会话在不同状态下的行为接口。 具体状态类(DisconnectedState、LogonSentState、EstablishedState、LogoutSentState) 实现此接口以处理各状态下的事件。
|
virtualdefault |
|
pure virtual |
获取状态名称
Implemented in fix40::DisconnectedState, fix40::LogonSentState, fix40::EstablishedState, and fix40::LogoutSentState.
|
pure virtual |
处理登出请求
| context | 会话上下文 |
| reason | 登出原因 |
Implemented in fix40::DisconnectedState, fix40::LogonSentState, fix40::EstablishedState, and fix40::LogoutSentState.
|
pure virtual |
处理收到的消息
| context | 会话上下文 |
| msg | 收到的 FIX 消息 |
Implemented in fix40::DisconnectedState, fix40::LogonSentState, fix40::EstablishedState, and fix40::LogoutSentState.
|
pure virtual |
处理会话启动事件
| context | 会话上下文 |
Implemented in fix40::DisconnectedState, fix40::LogonSentState, fix40::EstablishedState, and fix40::LogoutSentState.
|
pure virtual |
处理定时器检查事件
| context | 会话上下文 |
用于心跳发送、超时检测等周期性任务。
Implemented in fix40::DisconnectedState, fix40::LogonSentState, fix40::EstablishedState, and fix40::LogoutSentState.