简体   繁体   English

quickfix / j连接状态机

[英]quickfix/j connection state machine

Could somebody explain Quickfix/J connectivity as a finite state machine (ideally w/ a diagram)? 有人可以将Quickfix / J连接性解释为有限状态机(理想情况下带有图)吗?

Specifically what is the difference between the methods in SessionStateListener , (presumably representing the state changes), and what order should they occur in? 具体来说, SessionStateListener的方法(大概表示状态更改)之间的区别是什么,它们应该以什么顺序出现? :

  • onConnect 的onConnect
  • onDisconnect onDisconnect
  • onLogon ONLOGON
  • onLogout onLogout
  • onReset onReset
  • onRefresh onRefresh
  • onMissedHeartBeat onMissedHeartBeat
  • onHeartBeatTimeout onHeartBeatTimeout

What's the difference, for example between logon and connect? 有什么区别,例如登录和连接之间有什么区别? How is reset different from disconnect? 重置与断开连接有何不同? how does onMissedHeartBeat differ from onHeartBeatTimeout ? onMissedHeartBeatonHeartBeatTimeout有何不同? Is there a specific order these occur in eg can disconnect happen after a logon, but before a logoff? 这些操作是否有特定的顺序,例如可以在登录后但注销之前断开连接? In this case would the state be reset to "logged out"? 在这种情况下,状态会重置为“已注销”吗?

What's the difference, for example between logon and connect? 有什么区别,例如登录和连接之间有什么区别?

When you connect, a session is created between the initiator and acceptor. 连接时,将在发起方和接受方之间创建会话。 No messages can flow unless and until logon has happened. 除非并且直到登录发生,否则消息无法流动。 Logon is the authentication of the sender by the acceptor. 登录是接受者对发送者的身份验证。

onMissedHeartBeat differ from onHeartBeatTimeout onMissedHeartBeat与onHeartBeatTimeout不同

There is HeartBtInt in the config file, which mentions how long the initiator would wait for a hearbeat. 配置文件中有HeartBtInt ,其中提到启动程序等待侦听信号的时间。 If it doesn't receive it signals the connection isn't stable. 如果未收到,则表明连接不稳定。 If I remember correctly(I might be wrong) Quickfix/J disconnects and you need to relogin. 如果我没记错(我可能是错的),Quickfix / J将断开连接,您需要重新登录。 onMissedHeartBeat means you haven't received the heartbeat but maybe within, but also more than the timeout period. onMissedHeartBeat表示您尚未接收到心跳,但可能在一段时间内,但还超过了超时时间。

Disconnect can happen anytime, even if you are logged in or about to logoff. 断开连接随时可能发生,即使您已登录或即将注销。 The network got disrupted, your server crashed, there was an earthquake and power was disrupted. 网络中断,服务器崩溃,发生地震,电源中断。 When disconnect happens the session is terminated and you have to start the whole process again. 断开连接时,会话将终止,您必须重新开始整个过程​​。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM