|
From: Colin D. <co...@ma...> - 2019-10-31 13:31:11
|
I believe Bayu is saying that they use a timer to periodically check the state of session connections. For my part, I don't see anything wrong with this approach per se, though, it would be preferable, as you say, to use a SessionStateListener. On 10/31/19 3:15 AM, Christoph John via Quickfixj-users wrote: > QuickFIX/J Documentation: http://www.quickfixj.org/documentation/ > QuickFIX/J Support: http://www.quickfixj.org/support/ > > > > You could also implement the interface SessionStateListener. It has > callbacks onConnect() and onDisconnect(). One of these should get > called IMHO. > You could also call Session.isLoggedOn() anytime to check if it is > logged on or not. > > I don't know what you mean by "using timer". > > Cheers, > Chris. > > On 31.10.19 11:03, Bayu Adi wrote: >> Wow, thanks for very quick response. >> >> Yes, onLogout() did called when conection dropped out. >> but it cannot handle connection at first time app start. >> >> it called from disconnect(eason, logError) at Session class >> but how do I call it from banzai class? >> >> I can only get SessionID class from there? >> is anythin I can do for this? >> >> for example, maybe I can get Session.state from logon() so I can get >> logon status of this app? >> >> currently I've been using timer to know my app is logged in or not, >> but this is very bad idea. >> >> >> >> On Thu, Oct 31, 2019 at 4:20 PM Christoph John >> <chr...@ma... <mailto:chr...@ma...>> wrote: >> >> Hi, >> >> usually onLogout() is called when the connection is dropped. See >> explanations of callbacks here: >> https://github.com/quickfix-j/quickfixj#creating-a-quickfixj-application >> >> The logged exception comes from the network layer. The remote >> host could not be reached via any route. >> >> Cheers, >> Chris. >> >> On 31.10.19 05:44, Bayu Adi wrote: >>> QuickFIX/J Documentation:http://www.quickfixj.org/documentation/ >>> QuickFIX/J Support:http://www.quickfixj.org/support/ >>> >>> >>> >>> Hello, >>> >>> I've been wondering how to check app connection, and monitor >>> every incoming event server. >>> I've check the in the following : >>> toAdmin, toApp, fromAdmin and fromApp >>> incoming messages are handled fine, but if there were trouble in >>> network connection somehow it not even catch.. >>> >>> and for the firsttime app is running, I want to check wether the >>> connection is down or not, in console it was a exception displayed. >>> but i was unable to trace where it was coming from.. >>> >>> there is log i get from console : >>> <20191031-03:21:39, FIX.4.2:XXXX->CTS, error> >>> (java.net.NoRouteToHostException during connection to >>> /SERVER_IP:SERVER_PORT: java.net.NoRouteToHostException: No >>> route to host: no further information (Next retry in 5000 >>> milliseconds)) >>> >>> I want to know what method is produce this exception. >>> >>> thank in advance. >>> -- >>> >>> Akira >>> >>> >>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >>> Virus-free. www.avast.com >>> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> >>> >>> >>> >>> >>> _______________________________________________ >>> Quickfixj-users mailing list >>> Qui...@li... <mailto:Qui...@li...> >>> https://lists.sourceforge.net/lists/listinfo/quickfixj-users >> >> -- >> Christoph John >> Software Engineering >> T +49 241 557080-28 >> chr...@ma... <mailto:chr...@ma...> >> >> MACD GmbH >> Oppenhoffallee 103 >> 52066 Aachen, Germany >> www.macd.com <http://www.macd.com> >> >> Amtsgericht Aachen: HRB 8151 >> Ust.-Id: DE 813021663 >> Geschäftsführer: George Macdonald >> >> >> >> -- >> >> Bayu Adi >> > > -- > Christoph John > Software Engineering > T +49 241 557080-28 > chr...@ma... > > MACD GmbH > Oppenhoffallee 103 > 52066 Aachen, Germany > www.macd.com > > Amtsgericht Aachen: HRB 8151 > Ust.-Id: DE 813021663 > Geschäftsführer: George Macdonald > > > _______________________________________________ > Quickfixj-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfixj-users -- Colin DuPlantis Chief Architect, Marketcetera Download, Run, Trade 888.868.4884 https://www.marketcetera.com |